参考下面的代码
type
PArrayData = ^TArrayData;
TArrayData = array[0..9, 1..3] of Integer;
var
A: Variant;
P: PArrayData;
I, J: Integer;
begin
A := VarArrayCreate([1, 3, 0, 9], varInteger);
P := VarArrayLock(A);
try
for I := 0 to 9 do
for J := 1 to 3 do
P^[I, J] := J * 10 + I;
finally
VarArrayUnlock(A);
end;
WriteLn(A[1, 9]); { 19 }
WriteLn(A[3, 4]); { 34 }
end;