=, <, <=, <>, >, >= (Condition)

Compares two expressions and returns a value of "true" or "false".

Syntax

expression1

=
<
<=
<>
>
>=

expression2

Parameters

expression1

any value expression

expression2

any value expression

Return Value

Logical

Comments

In a conditional expression, the less than sign (<) compares the expressions to its left and right, and is logically true if the expression on the left is "smaller" than the expression on the right; otherwise, it is logically false.

In a conditional expression, the less than or equals sign (<=) compares the expressions to its left and right, and is logically true if the expression on the left is "smaller" than or equal to the expression on the right; otherwise, it is logically false.

In a conditional expression, the not equals sign (<>) compares the expressions to its left and right, and is logically true if they are not equal; otherwise, it is logically false.

In a conditional expression, the equals sign (=) compares the expressions to its left and right, and is logically true if they are equal; otherwise, it is logically false.

In a conditional expression, the greater than sign (>) compares the expressions to its left and right, and is logically true if the expression on the left is "larger" than the expression on the right; otherwise, it is logically false.

In a conditional expression, the greater than or equals sign (>=) compares the expressions to its left and right, and is logically true if the expression on the left is "larger" than or equal to the expression on the right; otherwise, it is logically false.

Examples

case
 when GeoLocation = "New York"
  ... commands ...
 otherwise
  ... more commands ...
endcase

while var1 < 11
 ... commands ...
 var1 = var1 + 1
endwhile

DayCare = {"subsidized" where GIncome <= 22000, "not subsidized"}

case
 when GeoLocation <> "Madrid"
  ... commands ...
 otherwise
  ... more commands ...
endcase

case
 when GoodsValue > 2000
  ... commands ...
 otherwise
  ... more commands ...
endcase

case
 when Age >= 65
  ... commands ...
 otherwise
  ... more commands ...
endcase

 

Related Topics