DynArrayToVariant

Convert a Dynamic Array To a Variant

Declaration

Source position: variants.pp line 146

  procedure DynArrayToVariant(var V: Variant; const DynArray: Pointer; 
                             TypeInfo: Pointer);

Description

DynArrayToVariant converts the dynamic array DynArray to a variant array V. It uses the type information in TypeInfo to calculate the number of dimensions, array lengths and type of the element. The dynamic array can only contain basic types.

If there is no data, an empty variant will be returned.

The opposite transformation can be performed with DynArrayFromVariant .

See also

Name Description
DynArrayFromVariant Convert a variant to a dynamic arrayt
VarArrayCreate Create a variant array
VarArrayCreateError Raise an EVariantArrayCreateError error
VarArrayOf Create a variants array of a series of values