program Projekt_10;
{$APPTYPE CONSOLE}
uses
  SysUtils,
  Variants;

type
  PDoubleArray = ^TDoubleArray;
  TDoubleArray = array[1..5, 1..5] of Double;
var
  P: PDoubleArray;
  i, j: Integer;
  A: Variant;
  Low, High: Integer;

begin
  A := VarArrayCreate([1, 3, 1, 3], varDouble);
  P := VarArrayLock(A);
  Low := VarArrayLowBound(A, VarArrayDimCount(A));
  High:= VarArrayHighBound(A, VarArrayDimCount(A));
  for i := Low to High do
    for j := Low to High do
      begin
        P^[i, j] := j * i + 0.15;
        Writeln('P[',i,',',j,']=',P^[i,j]:10:3);
      end;
  VarArrayUnlock(A);
  ReadLN;
end.


