Hola rebufo.
Si el documento siempre respeta el orden que mostras en tu mensaje, podrías armar la matriz de este modo:
Código Delphi
[-]
type
TMatriz = array[1..3, 1..100] of integer; ...
implementation
procedure ObtenerValores(var Matriz: TMatriz; var Tope: Integer);
var
F: TextFile;
s: string;
ts: TStrings;
fil,col: Integer;
begin
AssignFile(F,'C:\TU_ARCHIVO.TXT');
Reset(F);
while not Eof(F) and (s <> '[COORDENADAS]') do
ReadLn(F, s); Readln(F,s); fil:= 1;
while not Eof(F) and (s <> '[VERTICES]') do begin
Readln(F,s);
try
ts:= TStringList.Create;
ts.Clear;
ts.Delimiter:= ' ';
ts.DelimitedText:= s;
for col:= 0 to ts.Count-1 do
Matriz[col+1, fil]:= StrToInt(ts[col]);
finally
ts.Free;
end;
Inc(fil);
end;
Tope:= fil -1;
CloseFile(F);
end;
...
Ejemplo de llamada:
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
var
mt: TMatriz;
t,i: Integer;
begin
ObtenerValores(mt, t);
for i:= 1 to t do
Memo1.Lines.Add(IntToStr(mt[1,i])+'-'+IntToStr(mt[2,i])+'-'+IntToStr(mt[3,i]));
end;
Un saludo.