Keywords can be used as ordinary symbols in many unambiguous situations.
The precise rules are given in this chapter.
The free syntax of Rexx implies that some symbols are reserved for use
by the language processor in certain contexts.
Within instructions like IF, DO, or SELECT, some symbols can be reserved to separate
the parts of the instruction. These symbols are referred to as keywords.
Examples of Rexx keywords are the WHILE keyword in a DO instruction and the
THEN keyword, which acts as a clause terminator in this case, following an
IF or WHEN clause.
While typically these reserved keywords act as expression terminators,
using them as message names in message terms,
as Variable Reference terms,
or with parentheses around or within the expression,
can prevent these keywords from terminating the expression.
Here is an example how in a DO loop a variable named UNTIL
can still be used in a WHILE expression by putting parentheses around it.
Example 16.1. Instructions — DO WHILE expression with parentheses
doi=1while(i<until)sayiend
Apart from these cases, only simple symbols that are the first token in
a clause and that is
not a label,
not an assignment or
extended assignment, and
not a message instruction
are
checked to see if they are instruction keywords. The symbols can be freely
used elsewhere in clauses without being understood as keywords.