Table of Contents

Operators

The XL programming language defines several new operators, including arrow operators whose main purpose is to be used within production statements and which have no built-in meaning, i. e., they always refer to operator methods. The new operators a ** b, a <=> b and `a` have a built-in semantics which is described in the following. A complete list of all operators including their precedence is given there.

Exponentiation

The binary exponentiation operator a ** b is defined for operands of type float or double and computes the value a raised to the power of b. The computation is implemented by the method pow of java.lang.Math.

Comparison

The binary comparison operator a <=> b is defined for operands of numeric type. Its result type is int, and the value is 0 if a == b, 1 if a > b and -1 otherwise. The last case includes a < b, but also cases where a or b is Not-a-Number.

Quote

The unary quote operator `a` is defined for operands of any type and performs the identity operation, i. e., type and value are determined by the operand a. Thus, it is the same as (a), but the quote operator may be overloaded. This operator can be used for node patterns and node expressions if expressions have to be parenthesized, but normal parentheses cannot be used for syntactical reasons.