Fórum Exite como saber o tamanho da linha de um arquivo texto? #168890
11/07/2003
0
Preciso de uma rotina que leia (percorra) meu arquivo texto e me retorne o tamanho da maior linha.
Existe esta possibilidade?
Sem mais...
Existe esta possibilidade?
Sem mais...
Wgm8
Curtir tópico
+ 0
Responder
Posts
11/07/2003
Lucilton
AssignFile ( arq, nomeDoArquivo );
Reset ( arq );
tamanhomaior=0;
while not Eof ( arq ) do
begin
ReadLn ( arq, linha );
if tamanhomaior<lenght(linha) then
tamanho=length(linha);
end;
CloseFile ( arq );
Reset ( arq );
tamanhomaior=0;
while not Eof ( arq ) do
begin
ReadLn ( arq, linha );
if tamanhomaior<lenght(linha) then
tamanho=length(linha);
end;
CloseFile ( arq );
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)