Wikia

Delphi Programming

VarArrayCreate Routine

Talk0
2,909pages on
this wiki
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.
Advertisement | Your ad here

Around Wikia's network

Random Wiki