Cicode Programming Reference > Cicode Function Categories > Array Functions > ArrayGetInfo

ArrayGetInfo

Retrieves the size of the x–, y–, or z–dimension for an array.

Syntax

INT ArrayGetInfo(INT hArray, INT nType)

hArray:

The handle of the array.

nType:

0 = the array's x–dimension

1 = the array's y–dimension

2 = the array's z–dimension

Return Value

The size of the x–, y–, or z–dimension, if successful. If unsuccessful, –1 is returned. The error code can be obtained by calling the IsError Cicode function.

Related Functions

ArrayCreate, ArrayCopy, ArrayCreateByAn, ArrayDestroy, ArrayDestroyByAn, ArrayExists, ArrayExistsByAn, ArrayFillFromAlarmDataByAn, ArrayGetArrayByAn, ArrayGetInt, ArrayGetMapName, ArrayGetMapNameByAn, ArrayGetIntByAn, ArrayGetString, ArrayGetStringByAn, ArrayIsDirty, ArraySetInt, ArraySetIntByAn, ArraySetIsDirty, ArraySetString, ArraySetStringByAn, ArraySwap, DspArrayByAn

Example

...
hArray = ArrayCreate("TestArray", 3, 4, 5);
x=ArrayGetInfo(hArray,0);  //x-dimension expected = 3
y=ArrayGetInfo(hArray,1);  //y-dimension expected = 4
z=ArrayGetInfo(hArray,2);  //z-dimension expected = 5

See Also

Published June 2018