[Contents] · [Home] · [Mail]

SALIERI Language - Operator ">" (_GR)

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

Call syntax:
_GR(x, y)
x > y

The binary infix operator ">" realises the "greater than" relation on numerical and string objects. The result is TRUE if x is greater than 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= TRUE
> 0.3 > 0.4
Result= FALSE
> 1 > 0.999
Result= TRUE
> "any string" > "Any String"
Result= TRUE
> "any" > "any string"
Result= FALSE

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

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