Appearance
Boolean (Boolean)
Declaration
var myvariable : boolean
Example
pascal
procedure ScriptEvent (var Value : variant)
var myvariable : boolean
begin
myvariable := True; //you could also set to False
if myvariable = True then
loginfo('the myvariable boolean variable is true');
endDescription
Boolean is used to represent True or False values. Use the keywords True and False to assign one of the two states to a Boolean variable.
When a boolean can also be represented as a numeric value - False is equal to 0, True is equal to 1.
TIP
If a field within a DB Definition is specified as Boolean then it may require a display format for it to be correctly saved to the database. This is because the database represents the boolean as a numeric. Use the display format 1;0 to convert the boolean to a numeric when saving to the database.
TIP
If a field within a File Definition is specified as a Boolean then it may require a display format for it to be correctly saved to the file. You can use display formats such as 1;0 or True;False or TRUE;FALSE