getArrayDim

Syntax

int getArrayDim (int nr, int dim)

Arguments

nr
Number of the Array. Values from 0 to 99 are accepted.
dim
Determines which dimensions will be queried. Set it to 0 for X, 1 for Y and 2 for Z. See allocArray. New in FM 1.0 Beta 9d: Set this argument to -1 to return the base address of the Array; -2 to return the optional Buffer ID; -3 to return the total Array size in bytes; -4 to return the number of bytes per Array element; or -5 to return the padding size of the Array.

Return

Returns the amount of cells of one of the three dimensions of an Array (or various other information about the Array), depending on the dim parameter.

Description

Usually you know the sizes of the three dimensions of your Array(s). But in some cases it is convenient to use this function to check it again. For other information about the Array, such as the base address or Buffer ID, this API may be the only way to obtain the desired information.

Example

Also see

allocArray, allocArrayPad, freeArray, getArray, putArray, copyArray

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.