The Boolean type represents a logical value that can be either True or False.
The two standard boolean constants are True and False. They are case-insensitive in the source code but conventionally written in PascalCase.
// Type inference
var isReady := True;
var hasFinished := False;
// Explicit typing
var isValid : Boolean := True;
var isComplete : Boolean;
isComplete := False; Booleans are used with logical operators: not, and, or, and xor.
var a := True;
var b := False;
var result := (a or b) and (not b); // True Comparison operators (=, <>, <, >, <=, >=) result in a Boolean value.
var x := 10;
var y := 20;
var isGreater := x > y; // False Booleans can be converted to strings using BoolToStr or the .ToString helper.
var b := True;
PrintLn(b.ToString); // "True" True
Booleans are the foundation of decision making. See Conditionals for usage in if and case statements, or Basic Operators for logical operations like and, or, and not.