|
Boolean Interaction Variables
Boolean interaction variables allow the GPP developer to define a simple choice variable that can be either Yes or No.
BOOLEAN_ variables are actually numeric integer variables. They use the value 0 for No and 1 for Yes.
The actual internal format of BOOLEAN_ variables is SEQUENCING (if used for OUTPUT, the result will be a number, with the SEQUENCING format).
Unlike MULTI_CHOICE variables, the prompt string for BOOLEAN_ interaction variables does not have to contain any choices displayed to the user (they are always Yes and No).
Example
INTERACTION (BOOLEAN_) "To Be or Not to Be?" TheQuestion = YES_;
The initial value is YES_ (equal to 1), which corresponds to Yes. All the Boolean constants (TRUE_ and YES_ for 1, FALSE and NO_ for 0) can be used as initial values for Boolean interaction variables.
GPP2 does not enforce the assignment of values to BOOLEAN_ variables. It is the responsibility of the GPP developer to ensure that only 0 or 1 are assigned to such variables.
|