Skip to main content

Less Than or Equal To (<= or '>)

Tests if the left operand is less than or equal to the right operand, after interpreting both operands as numbers.

Details

You can produce a Less Than or Equal To operation by:

  • Combining the Less Than (<) and Equals (=) operators. The two operators used together give return TRUE if either one returns TRUE.

  • Using a Unary NOT operator (') with Greater Than (>). The two operators used together reverse the truth value of the Greater Than.

ObjectScript produces a result of TRUE (1) when the left operand is numerically less than or equal to the right operand. It produces a result of FALSE (0) when the left operand is numerically greater than the right operand.

Examples

You can express the Less Than or Equal To operation in any of the following ways:

operand_A <= operand_B
operand_A '> operand_B
'(operand_A > operand_B)

The following example tests two variables in a Less Than or Equal To operation. Because both variables have an identical numerical value, the result is TRUE.

 SET A="55",B="55" 
 WRITE A'>B

returns 1.

FeedbackOpens in a new tab