next up previous contents index
Next: Symbolic Constants Up: Variable Definitions Previous: Real Vector Variables   Contents   Index


Logical Variables


BOOL variable-name=logical-expression;
This statement creates a new global variable variable-name and discards any old variable with the same name. Its value depends on all quantities occurring in logical-expression. Whenever an operand changes in logical-expression, a new value is calculated. The definition may be thought of as a mathematical equation. However, MAD is not able to solve the equation for a quantity on the right-hand side.

Example:


BOOL FLAG = X != 0;
Circular definitions are not allowed, but redefinitions by assignment are allowed.



MAD User Guide, http://wwwslap.cern.ch/mad/