Sign in Join
FPDoc Onlineexperiment

VarArrayGet function

In unit System

Get a value from a single cell of a variant array.

Declaration

pascal
function VarArrayGet(const A: Variant; const Indices: Array of LongInt)
: Variant

Description

VarArrayGet returns the value in the variant array A at the location indicated by Indices. Thus the statement

B:=VarArrayGet(A,[2,1]);

is equivalent to

B:=A[2,1];

The difference is that the previous is usable when the amount of indices is not known at compile time.

Errors

If the number of indices is wrong (or out of range) an exception may be raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.