PA_SetBooleanInArray

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

version 2003


PA_SetBooleanInArray (array; index; value)

ParameterTypeDescription
arrayPA_VariableArray to access
indexlongIndex of the element to access
valuecharNew value for the index element

Description

The routine PA_SetBooleanInArray sets the index element of the boolean array array to value.

If array is not a eVK_ArrayBoolean or if index is out of range, the routine does nothing.

Remember to use 0 for False and 1 for True.

Example

Initialize every element of a boolean array to a special value.

   void FillBooleanArrayWith( PA_Variable arr, char value )
   {
      long   count, i;
      char   newValue = 0;

      if ( value )
         newValue = 1;

      count = PA_GetArrayNbElements(arr);
      for ( i = 1; i <= count; i++ )
         PA_SetBooleanInArray(arr, i, newValue);
   }

See Also

PA_GetBooleanInArray.

Error Handling

None.


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