A NetRexx program is parsed into clauses (most often delimited by end-of-line, but also by semicolon and certain keywords), following Rexx rules. Recognizing that command strings to environments are now often replaced by other forms of messages, NetRexx does not assume that any clause that is an expression is a command string. This frees several combinations of syntax for other uses.
Forms of clause that are currently defined are:
Null clauses: any empty clause. These are ignored, as in Rexx, and can never affect the execution of a NetRexx program.Method clause: a clause with the syntax of a single term of which the last or only part resolves to a method call.
Assignment: a clause consisting of a single term, followed by an '=' character and an expression. An assignment introduces a variable and sets its type if the target is a simple symbol and it is the first occurrence of that variable name in a context.
Keyword instruction: a clause that is not one of the above and is introduced by a simple symbol that is a keyword known to NetRexx. The rules for keyword safety are stronger than in Rexx: a keyword (or sub-keyword) in NetRexx will only be recognized if it is not the name of a known variable.
There are no label clauses (e.g., 'fred:') in NetRexx; labels for blocks are given on the instruction that starts the block.
[ previous section | contents | next section ]
From 'netrexx.doc', version 1.00.
Copyright(c) IBM Corporation, 1996, 1997. All rights reserved. ©