call Beep 500, 100 /* Example 1: a subroutine call */
The built-in function BEEP is called as a Rexx subroutine. The return value from BEEP is placed in the Rexx special variable RESULT
.
bc = Beep(500, 100) /* Example 2: a function call */
BEEP is called as a Rexx function. The return value from the function is substituted for the function call. The clause itself is an assignment instruction; the return value from the BEEP function is placed in the variable bc
.
Beep(500, 100) /* Example 3: result passed as */
/* a command */
The BEEP function is processed and its return value is substituted in the expression for the function call, like in the preceding example. In this case, however, the clause as a whole evaluates to a single expression. Therefore, the evaluated expression is passed to the current default environment as a command.