Skip to content

ArrayDimensionSize

Include: Use System\Reflection.pkg

See Also: ArrayTypeOf, ArrayDimensionCount, ArrayDimensionSize, ValueTypeOfArray, ArrayInstanceSize

Purpose

Returns the declared size for a fixed array dimension.

Syntax

Function ArrayDimensionSize Global Handle hArray Integer iDimension Returns Integer

Arguments

hArray : Array metadata handle.

iDimension : Zero-based dimension index. The API name and parameter spelling are Dimension.

Returns

The declared fixed-array dimension size, or 0 for dynamic array metadata.

Behavior

The API name and parameter spelling are Dimension. Dynamic array metadata returns 0 for dimension size. For fixed arrays, iDimension is zero-based. Out-of-range dimensions and invalid handles raise a DataFlex error.

Example

Integer[2][5] aiValues
Handle hArray
Integer iDims iSize
DfType eType

Get ArrayTypeOf aiValues to hArray
Get ArrayDimensionCount hArray to iDims
Get ArrayDimensionSize hArray 1 to iSize
Get ValueTypeOfArray hArray to eType