PA_SetBooleanVariable


version 2003


PA_SetBooleanVariable (aVariable; newValue)

Parameter Type Description
aVariable PA_Variable * Pointer to the variable to access
newValue char New value for aVariable

Description

The routine PA_SetBooleanVariable sets the content of the boolean variable pointed to by aVariable to newValue .

WARNING

The kind of variable pointed to by aVariable is set to eVK_Boolean by the routine, even if it was not its previous kind.

Make sure that you do not change 4D variable kinds (using PA_GetVariable ), especially in compiled mode.

Remember that True = 1 and False = 0 for 4D.

Example

Use macros for True and False.

   #define FALSE4D   ((char)0)
   #define TRUE4D   ((char)1)
   void mySetBooleanVariable(PA_Variable *v, char b)
   {
      if(PA_GetVariableKind(*v) == eVK_Boolean)
      {
         if(b)
            PA_SetBooleanVariable(v,TRUE4D);
         else
            PA_SetBooleanVariable(v,FALSE4D);
      }
   }   

See Also

No reference.

Error Handling

PA_GetLastError

keeps the last error that occurred before calling the routine.