Structural Operators

if bool then expression else expression

This construct first evaluates the expression following if, and implicitly casts it to bool. If it is true, the expression following then will be evaluated and returned, otherwise the expression following else.

All three sections must be present – the else part cannot be omitted.

input_boolean = true
input_string1 = "a"
input_string2 = "b"
if #input_boolean then #input_string1 else #input_string2

value = 3
divisor = 0
if #value > 0 and #divisor > 0 then
  #value / #divisor