Rexx Programming/How to Rexx/function

Function calls are followed by parenthesesEdit

Function calls are followed by parentheses containing optional parameters to the function. A pair of empty parentheses are used if the function has no optional parameters.

Whitespace is not allowed between a function name and its argument listEdit

The parentheses containing function arguments must immediately follow the function name. No whitespace characters are allowed between the function name and its argument list, otherwise the function name may get misinterpreted as a variable name:

say random() /* No whitespace is allowed between the function and the parentheses */

Functions always return a resultEdit

Functions in rexx always return a result which is substituted into the expression in place of the function call after the function has been executed.

Last modified on 18 May 2011, at 23:16