Registriert seit: 30. Sep 2006
Ort: Gundelfingen
1.109 Beiträge
Delphi 2007 Professional
|
Re: document laden
5. Jan 2007, 23:40
so vllt...
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
f: TextFile;
temp: string;
n: Integer;
s1, s2: array of string;
begin
n := 1;
setLength(s1, 1);
setLength(s2, 1);
AssignFile(f, 'C:\Test.txt');
Reset(f);
while not EOF(F) do
begin
ReadLN(f, temp);
setLength(s1, length(s1)+1);
setLength(s2, length(s2)+1);
s1[n] := copy(temp, 1, Pos(':', temp)-1);
s2[n] := copy(temp, Pos(':', temp)+1, length(temp)-Pos(':', temp));
inc(n);
end;
CloseFile(f);
end;
Dominik
|
|
Zitat
|