Skip to content

false (constant)

Syntax

false

Description

A constant that evaluates to 0.

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.

Examples

The following causes "x was false!" to be printed.

x = 0
if (x == false) then {
    print("x was false!")
}

See Also