What is a Function?

A function is a sequence of instructions that can receive data, process it, and return a value. In REXX, there are several kinds of functions:
Regardless of the kind of function, all functions return a value to the program that issued the function call. To call a function, type the function name immediately followed by parentheses enclosing arguments to the function (if any). There can be no space between the function name and the left parenthesis.
function(arguments)
A function call can contain up to 20 arguments separated by commas. Arguments can be:
All functions must return values. When the function returns a value, the value replaces the function call. In the following example, the language processor adds the value the function returns to 7 and produces the sum.
SAY 7 + function(arguments)

A function call generally appears in an expression. Therefore a function call, like an expression, does not usually appear in an instruction by itself.


Concept Concept

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/rvse028.html