version 2003
PA_GetArrayCurrent (array) long
Parameter | Type | Description | |
array | PA_Variable | Array to access | |
Function result | long | Value of the current element in the array |
Description
The routine PA_GetArrayCurrent returns the current element in the array array.
If the parameter PA_Variable array is not an array, the routine returns -1.
An array can hold up to 2 billions elements, but the Macintosh user interface can only display the 32767 first elements of an array in a list, as such the current element is also limited to 32767 (it is internally stored in a short).
Example
Get the value of the current element of a longint array.
long GetCurrentLongIntArrayValue( PA_Variable liArray ) { long current; long value = -1; if ( PA_GetVariableKind( liArray ) == eVK_ArrayLongint ) { current = PA_GetArrayCurrent( liArray ); value = PA_GetLongintInArray( liArray, current ); } return value; }
See Also
Error Handling
None.