allocArrayPad
Syntax
- int allocArrayPad (int nr, int X, int Y, int Z, int bytes, int padding)
Arguments
- nr
- Number of the Array. Values from 0 to 99 are allowed.
- X, Y, Z
- Amount of X, Y and Z cells in the three-dimensional array. If you want to allocate a one-dimensional array simply set Y and Z to zero. If you want to allocate a two-dimensional array, please set Z to zero.
- bytes
- Size in bytes of each cell of the array. Only values of 1, 2, 4 and 8 are allowed.
- padding
- Size of the padding.
Return
- Returns a value of 1 if the allocation succeeded and a value of zero if it failed.
Description
- allocArrayPad works just like allocArray with the difference that there is an additional parameter for the padding size. For example, if you use allocArrayPad(0,200,200,1,1,3), which sets the padding size to 3, you can read and write values at the coordinates (-3,-3) and (202,202).
Also see
- allocArray, freeArray, getArray, putArray, getArrayDim, copyArray, set_array_mode
Comments
- Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.