PA_SetBooleanInArray


version 2003


PA_SetBooleanInArray (array; index; value)

Parameter Type Description
array PA_Variable Array to access
index long Index of the element to access
value char New 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.