Fandom

Delphi Programming

VarArrayCreate Routine

2,918pages on
this wiki
Add New Page
Talk0 Share

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.

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

UnitEdit

DescriptionEdit

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

ExamplesEdit

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

Also on Fandom

Random Wiki