An
operator is a representation
of an operation, such as an addition, to be carried out on one or two terms.
Each operator, except for the prefix operators, acts on two terms, which can
be symbols, strings, function calls, message terms, intermediate results,
or subexpressions. Each prefix operator acts on the term or subexpression
that follows it. Whitespace characters (and comments) adjacent to operator
characters have no effect on the operator; thus, operators constructed from more
than one character can have embedded whitespace and comments. In addition, one
or more whitespace characters, if they occur in expressions but are not adjacent
to another operator, also act as an operator. The language processor
functionally translates operators into message terms. For dyadic operators,
which operate on two terms, the
language processor sends the operator as a message to the term on the left,
passing the term on the right as an argument. For example, the sequence
The blank concatenation operator sends the message " "
(a single blank), and the abuttal concatenation operator sends the ""
message (a null string). When the ¬ character is used in an operator, it
is changed to a
\. That is, the operators
¬= and \= both send the message \= to the target object.
For an operator that works on a single term (for example, the
prefix - and prefix + operators), Rexx sends a message to the term,
with no arguments. This means
-z has the
same effect as
z~"-".