Advertisement
vargalex

Untitled

Apr 24th, 2020
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.57 KB | None | 0 0
  1. program fileStringList;
  2. uses classes, sysutils;
  3.  
  4. var strList: TStringList;
  5.     strListLine: TStringList;
  6.     i, j: integer;
  7.  
  8. begin
  9.   strList := TStringList.Create;
  10.   strListLine := TStringList.Create;
  11.   strListLine.Delimiter := ' ';
  12.   strList.LoadFromFile('test.txt');
  13.   for i:=0 to strList.count-1 do
  14.     begin
  15.         strListLine.DelimitedText := strList[i];
  16.         for j:=0 to strListLine.count-1 do
  17.             begin
  18.                 writeln('Line' + intToStr(i)  + ', column' + intToStr(j) + ':' + strListLine[j]);
  19.             end;
  20.     end;
  21.   strList.free;
  22. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement