type
Matrix = array of array of double;
TForm1 = class(TForm)
Memo1: TMemo;
procedure FormShow(Sender: TObject);
private
public
end;
var
Form1: TForm1;
OPMatrix : Matrix;
teller, teller2 : integer;
function Fill : Matrix;
implementation
{$R *.lfm}
function Fill : Matrix;
var M : matrix;
X, Y : double;
begin
X := 0;
Y := 0.0;
for teller := 0 to 10 do
begin
X := X + 1;
Setlength(M,teller + 1);
Y:= X;
for teller2 := 0 to 10 do
begin
Y := Y + 0.1;
Setlength(M[teller],teller2 + 1);
M[teller,teller2] := Y;
end;
end;
Result := M
end;
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
begin
OPMatrix := fill;
for teller := 0 to 10 do
begin
for teller2 := 0 to 10 do
memo1.lines.add(FloatToStr(OPMatrix[teller,teller2]));
end;
end;
end.