Set bool

Purpose: Set value of a boolean variable.

 set-bool <variable> [ = <boolean expression> | <comparison> ] [ process-scope ]

If equal sign (=) is not used, the boolean variable <variable> is assign "false".

If <boolean expression> is specified (see boolean-expressions), then <variable> is assigned its computed value.

If <comparison> is specified (see "comparison" definition in if-true), then <variable> is assigned true if <comparison> evaluates to "true" and false if it evaluates to "false".

If "process-scope" clause is used, then boolean is of process scope, meaning its value will persist from one request to another for the life of the process; in the statement where <variable> is created, the assignment will take place only once. This clause can only be used if <variable> did not already exist.
Examples
Assign "true" value to boolean variable "my_bool":
 set-bool my_bool = true

Assign boolean value based on comparison:
 ...
 set-bool my_bool = num1 equal num2 or str1 not-equal str2



Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.