Please enable JavaScript to view this site.

ESL Documentation

Relational operators allow you to compare two values to determine the relationship between them. You can specify the following relational operators in an expression:

 

Operator

Meaning

Example

=

Equal to

(A = "Boston")

!=

Not equal to

(Slope != 10)

<

Less than

((B * 50) < C)

<=

Less than or equal to

(Debts <= Assets)

>

Greater than

(5000 > Curve)

>=

Greater than or equal to

(Xtan >= Xsin)

 

Each of these operators compares two operands and generates a boolean value (true or false) as a result. For example, the expression:

 

(5000 > Curve)

 

is true if 5000 is greater than the value of the integer variable, Curve, and false otherwise.

 

With a relational operator, ESL allows you to specify any values as operands, provided that the types of operands match. If one of your operands has a string value, the other also must have a string value. If one of the operands has an integer value, the other also must have an integer value. You cannot specify an expression such as:

 

("0" = 0)                # WRONG