drop variableList
where: variableList is one or more symbol names separated by spaces. When a symbol name is enclosed in parentheses it is a special reference variable as described in the variable reference section below. |
The drop instruction removes one or more variables. The value of these variables becomes unassigned.
Note: when the drop instruction removes variables that are exposed, in the current procedure context, the variables removed from a calling procedure context.
The variables being removed can be one of the following:
Click here to review how Rexx variables are used.
Within the list of variables that are being dropped, one additional capability can be used. A variable name can be enclosed in parentheses. This removes the specific variable, and addition its value is used as a subsidiary list. The list consists of a series of variable names separated by spaces. Each of these are removed in sequence from left to right.
Note: the variable reference capability was added in language level 4.0 (TRL-2). Thus, this capability may be absent in some Rexx implementations.
Here is a simple example of the use of a variable reference in a drop instruction.
/* main procedure */ varlist = 'a b c' call getvalues say a b c drop (varlist) /* this removes varlist and the variables a, b, and c */ return 0 getvalues : procedure expose (varlist) parse value 'abra ca dabra' with a b c return |