Skip to main content

Software > Software Development > IBM REXX Family >

NetRexx

Technical detail

Clauses and Instructions

Clauses are recognized, and can usefully be classified, in the following order:

Null clauses

A clause that is empty or comprises only blanks, comments, and continuations is a null clause and is completely ignored by NetRexx (except that if it includes a comment it will be traced, if reached during execution).

Note: A null clause is not an instruction, so (for example) putting an extra semicolon after the then or else in an if instruction is not equivalent to putting a dummy instruction (as it would be in C or PL/I). The nop instruction is provided for this purpose.

Assignments

Single clauses within a class and of the form term=expression; are instructions known as assignments. An assignment gives a variable, identified by the term, a type or a new value.

In just one context, where property assignments are expected (before the first method in a class), the '=' and the expression may be omitted; in this case, the term (and hence the entire clause) will always be a simple non-numeric symbol which names the property

Method call instructions

A method call instruction is a clause within a method that comprises a single term that is, or ends in, a method invocation.

Keyword instructions

A keyword instruction consists of one or more clauses, the first of which starts with a non-numeric symbol which is not the name of a variable or property in the current class (if any) and is immediately followed by a blank, a semicolon (which may be implied by the end of a line), a literal string, or an operator (other than '=', which would imply an assignment). This symbol, the keyword, identifies the instruction.

Keyword instructions control the external interfaces, the flow of control, and so on. Some keyword instructions (do, if, loop, or select) can include nested instructions.

 

 

PreviousTable of contents Next
We're here to help
Easy ways to get the answers you need.
E-mail us

or call us at
877-426-3774
Priority code:
104CBW67