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.
see the VCL Documentation Guidelines for an overview on doc pages




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 CommentsEdit

(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.


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

See AlsoEdit

User Comments/TipsEdit

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

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.