Boolean operators

Some operators compare the values of true/false conditions and return combinations or inversions of those values. These are what are referred to as boolean operators because the values they work with are true/false as opposed to numbers in general.

Operators

And

And is used to combine two values on the rule that, if both are true, the result is true; otherwise the result is false.

Is

Is returns the value of an attribute in an object. If the attribute is set, is returns true; otherwise it returns false. May be inverted by using is not.

Not

Not is used to negate or reverse a single boolean value. In testing whether an attribute is set, or an object is defined, not reverses the test. In the following code

if (thedoor is not open )
if (not thedoor)

The first line tests that the open attribute was not set for the object thedoor, and the second line tests to see if the object thedoor is not defined. Often used in a verb routine to determine whether someone typed a parameter to a verb.

Or

Or is used to combine two values on the rule that, if either is true, the result is true; otherwise the result is false.

See Also: Operators, keywords