PA_GetArrayCurrent

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_GetArrayCurrent (array) long

ParameterTypeDescription
arrayPA_VariableArray to access
Function resultlongValue 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

PA_SetArrayCurrent.

Error Handling

None.


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next