Delphi Programming
Advertisement
This page is intended as a supplement to the official documentation on Delphi programming. CodeGear is in the process of putting the Delphi documentation on the Web. Once they have done so, this page will link to the relevant page in the official documentation.
Info
see the VCL Documentation Guidelines for an overview on doc pages

Unit[]

Description[]

Definition:

function VarArrayCreate(const Bounds: array of Integer; AVarType: TVarType): Variant;


Creates a variant array of specified dimensions and type. The result is stored in a Variant type.

Technical Comments[]

(Known issues / Documentation clarifications / Things to be aware of)

  • The first parameter "Bounds" is an array of Integer. So you would call it [0, 9] to create a one dimensional array with 10 elements numbered 0 - 9. If the array has an even number of elements then you will get an EVariantArrayCreateError.
  • The second parameter is the element type of the array. For example this could be vtString, vtVariant or vtInteger.

Examples[]

(Please provide links to articles/source code that show how to use this item.)

See Also[]

User Comments/Tips[]

  • Jim McKeeth - Remember to pass an array with at least two elements for the first parameter.
Advertisement