Kilowatt Software's
Classic Rexx Tutorial
Language Level 4.00 (TRL-2)

Instruction classification

Rexx instructions are sequences of tokens that precede an instruction terminator. Many Rexx instructions start with a reserved instruction keyword (in any character case), in which case the instruction is generally classified as a keyword instruction. There are two exceptions. If the second token of the instruction begins with an equal sign (=), the instruction is classified as an assignment instruction. If the second token of the instruction is a colon (:), the combination is treated as a label and classification of the instruction proceeds with the tokens that follow the colon. When the instruction is neither an assignment instruction, nor a recognized keyword instruction, then the instruction is classified as a system command.

Note: if a function call starts where an instruction is expected, the instruction is processed as a command! You should be particularly careful if you use isolated function calls in other programming languages; such as, C, C++, C#, Java, etc. BUT THERE IS A SPECIAL CASE !!. If the instruction begins with a reserved keyword instruction token, the instruction will not be treated as a command, even if the keyword is immediately followed by a left parenthesis, which in all other cases would be treated as a function invocation. Here is an example of this special case.

The 2nd instruction above is an arg instruction. The left parenthesis begins a pattern matching template term.

There are other reserved keywords that can appear where an instruction is expected to begin. These have special meaning within their context. These other special keywords are: then, else, when, otherwise, and end.

Reserved instruction keywords

The following is the list of keywords associated with keyword instructions.

Kilowatt Software's -- Classic Rexx Tutorial -- Back to top
Click here if you have any comments or questions regarding this tutorial

Last updated on: 10 Sep 2002