Special variables: Difference between revisions

m
→‎{{header|REXX}}: re-instated use of USED instead of REUSED, removed arg() --- not a variable, but a function, re-listed the 3 special variables, re-instituted the original wording to make it clear what special variables are. -- ~~~~
m (→‎{{header|REXX}}: re-instated use of USED instead of REUSED, removed arg() --- not a variable, but a function, re-listed the 3 special variables, re-instituted the original wording to make it clear what special variables are. -- ~~~~)
Line 1,109:
 
=={{header|REXX}}==
The REXX language has three special variables:
 
* '''RC'''           [the return code from commands issued to the host.]
The special variables may be reused as regular variables and their names are not reserved.
* '''RESULT ''' [the result returnRETURNed from a subroutine or function.]
* '''SIGL'''       [the source line #number that did the transfer of control.]
 
Each of the above may be used as regular REXX variables, they aren't reserved keywords or
* arg() - The command line parameters (minus the program name) are concatenated into a single element arg(1)
reserved variable names.
* RC [the return code from commands issued to the host.]
<br>Because REXX may define any of these variables, it isn't recommended that they be used as regular REXX variables.
* RESULT [the result return from a subroutine or function.]
 
* SIGL [the source line # that did the transfer of control.]
Initially, the above three special variables aren't defined (until the appropriate action for their use is performed).
 
If no commands have been issued to the host, the '''RC''' special variable isn't defined.
<br>If no subroutines have been invoked, then the '''RESULT''' special variable isn't defined.
<br>If no SIGNAL or CALL (or subroutine invocation) has been used, then the '''SIGL''' special variable isn't defined.
 
In each case, the variable names may be in lower/upper/mixed case.