CreateArrayFromType¶
Include: Use System\Reflection.pkg
See Also: ArrayTypeOf, ArrayDimensionCount, ArrayDimentionSize, ValueTypeOfArray, ArrayInstanceSize
Purpose¶
Creates an array value from array metadata and sets the first dimension to iSize.
Syntax¶
Function CreateArrayFromType Global Handle hType Integer iSize Returns Variant
Arguments¶
hType
: Array metadata handle.
iSize
: Size to assign to the first dimension.
Returns¶
A new array value as a Variant.
Behavior¶
Invalid or zero handles raise a DataFlex error. Use 0 for an initially empty dynamic array.
Example¶
String[] asNames
Handle hArray
Variant vNewArray
Get ArrayTypeOf asNames to hArray
Get CreateArrayFromType hArray 0 to vNewArray