Relational Operators

The relational operators (=, <>, <, >, <=, and >=) compare two operands. All the relational operators result in a Boolean value.

The relational operators have the following general meaning:

The equality operators are defined for all types. The nonequality operators are only defined for the numeric, name, and string types.

Note: You cannot compare string values to numeric values.

The following table shows examples of the relational operators.

Operand Type Example Result
Number and Integer 3.0 = 3 True
Numbers 34 <= 29.0 False
Numbers 12 <> 8 True
Strings "Name" = "name" True
Points Point(3,0,0) = Point(0,3,0) False