Conditional Expressions

Conditional expressions evaluate and return boolean (TRUE and FALSE) expressions for conditional and looping expressions. They can contain conditional operators, and and or.

Examples of conditional expressions -

if SomeVar is TRUE, x will be 10.

if SomeOtherVar is TRUE and AnotherVar is FALSE, x will be 10.

if SomeVar is FALSE, SomeOtherVar is FALSE and AnotherVar is FALSE, x will be 20.

if SomeVar is FALSE, SomeOtherVar is FALSE and AnotherVar is TRUE, x will be 20.

(if (SomeVar or (SomeOtherVar
and not AnotherVar))

= x 10

)(else

= x 20

)

= x 10

)(else

= x 20

)