Boolean Expressions

Boolean Expressions

A Boolean expression holds 0 (zero) as false and non-zero as true.
Formats
<STRING EXPRESSION> <BOOLEAN COMPARE> <STRING EXPRESSION> <NUMERIC EXPRESSION> <BOOLEAN COMPARE> <NUMERIC EXPRESSION> NOT(<BOOLEAN EXPRESSION>)
Parameters
<STRING EXPRESSION>
= a string variable, string constant or any combination with concatenation
<NUMERIC EXPRESSION>
= any mathematical operation
Comments
A numeric expression cannot be compared to a string expression.
Numeric expressions can substitute a Boolean expression where a value of 0 (zero) represents false and a non-zero value represents true.
Base Boolean expressions:
< (less than)
Expression
Result
1< 2
true
2<2
false
2<1
false
<= (less than or equal to)
Expression
Result
1<=2
true
2<=2
true
2<=1
false
> (greater than)
Expression
Result
1> 2
false
2>2
false
2>1
true
>= (greater than or equal to)
Expression
Result
1>=2
false
2>=2
true
2>=1
true
= (equal to)
Expression
Result
1=2
false
2=2
true
"A"="AA"
false
"A"="A"
true
<> (not equal to)
Expression
Result
1<>2
true
2<>2
false
"A"<>"AA"
true
"A"<>"A"
false