true (constant)¶
Syntax¶
Description¶
A constant that evaluates to 1.
Truthy and Falsey Values¶
Like in many programming languages, FRED's numeric expressions can be evaluated as either true or false. Values that evaluate to true are considered "truthy", and values that evaluate to false are considered "falsey".
In FRED, a value of 0 is falsey, and all non-zero values are truthy.
Important
Note that just because a value is truthy, does not mean that it's equal to
true! true is 1, but any non-zero number can be truthy.
Examples¶
The following causes "x was true!" to be printed.