[Contents] · [Home] · [Mail]

SALIERI Language - Operator "<=" (_LEQ)

_LEQ: integer x integer -> boolean
_LEQ: real x real -> boolean
_LEQ: string x string -> boolean

Call syntax:
_LEQ(x, y)
x <= y

The binary infix operator "<=" realises the "less than or equal" relation on numerical and string objects. The result is TRUE if x is less than or equal y, FALSE otherwise.

On integer and real objects, "<=" is defined in the usual way; though caution is advised when using reals, since by inherent inaccuracies of real arithmetics, the result might be sometimes incorrect. Mixing integer and real objects is allowed, in this case, an automatic type conversion from integer to real is done by the system.

On string objects, "<=" is defined with respect to the standard lexicographic ordering on ASCII encoded character strings. Thus basically, strings are ordered as they would be in a dictionary; however, numerals appear before uppercase letters and those before lowercase letters. For the exact positions of special characters, please refer to any ASCII table.

In expressions, "<=" binds stronger than the boolean operators, but weeker than the arithmetic, length, or list access operators.

> 21 <= 12
Result= FALSE
> 0.4 <= 0.3
Result= FALSE
> 1 <= 1.0
Result= TRUE
> "any string" <= "Any String"
Result= FALSE
> "any" <= "any string"
Result= TRUE

See also: Operator "<" (_LE), Operator ">=" (_GEQ), Operators and Expressions.

[Contents] · [Home] · [Mail]
© sic!systems, page frame designed by hh; this page has been automatically generated from the SALIERI Documentation Database.