Re: Handling Strings / Files.Posted by Jean Claude Servaye on May 12, 2001 at 02:52:11: In Reply to: Handling Strings / Files. posted by GuptiRanj. on May 12, 2001 at 02:34:01:
var F1,F2: TextFile; A : String; Begin AssignFile(F1,'exemple1.txt'); Reset(F1); // open the file in read mode AssignFile(F2,'modified1.txt'); Rewrite(F2); While not Eof(F1) do begin //for all the line< in file1 Readln(F1,A); // read a line .... // do someting with the line Writeln(F2,A); // and save the result in destination file end; CloseFile(F1); CloseFile(F2); end;
|
|