Next: Comparison and Logical Operators, Previous: Constant Values and Types, Up: Expressions: The Engine of STARTER [Contents]
In STARTER, TRUE and FALSE are simply aliases for constants:
FALSEIs exactly 0.
TRUEIs exactly 1.
However, the system evaluates any non-zero value as TRUE. This is a classic programmer’s concept, but it’s vital for clever automation.
For example:
beep:status {
SET TRUE WHEN time:minute;
SET FALSE WHEN TRUE;
}
Why would this make the computer beep almost all the time? Because time:minute is only 0 at the very start of the hour. For every other minute (1 through 59), the value is non-zero, which the system interprets as TRUE. The beep only stops for that first minute of the hour!