Boolean operators

<< Click to Display Table of Contents >>

Navigation:  Basic concepts > Operators >

Boolean operators

GPScript has the usual comparison operators (<, >, <=, >=, ==, !=) as well as the Boolean operators And, Or, Not and Xor. Precedence rules are such that you very rarely require parentheses. GPScript also has a ternary operator following the style of Algol and, more recently, Haskell:

Result = if widgetValue > 0.5 then 1 else 0

 
Note that the 'else' is not optional in the ternary operator.