Previous Top Next

Instructions

Each REXX instruction is one ore more clauses, the first clause is the one that identifies the instruction. Instructions end with a semicolon or with a new line. One instruction may be continued from one line to the next by using a comma at the end of the line. Open strings or comments are not affected by line ends.

The General Guidelines are:

name refers to a variable, which can be assigned any value. name is a symbol with the following exception: the first character may not be a digit or a period. The value of name is translated to uppercase before use, and forms the initial value of the value of the variable. Some valid names are: Fred COST? next index A.j name: is a form of labels for CALL instructions, SIGNAL instructions, and internal function calls. The colon acts as a clause separator. template is a parsing template, described in a later section. instr is any one of the listed instructions.

The Instructions are:

expression the value of expression is issued as a command, normally to the command interpreter or to the specified environment specified by the ADDRESS instruction. Look also the section "Issuing Commands to Host System." ie. 'DIR' '*.exe' name = [expr]; is an assignment: the variable name is set to the value of expr. ie. fred = 'sunset' a = 1 + 2 * 3 a = /* a contains '' */ ADDRESS [ [expr]]; redirect commands or a single command to a new environment. ADDRESS VALUE expr may be used for an evaluated environment name. ie. address int2e 'dir' /* executes through int2e a dir cmd address system /* all the following command will be addressed to system */ env = 'dos' address value env /* change address to dos */ ARG