Functions
Last updated
Last updated
PRX ships with an extensive of predefined functions, offering a wide array of functionality for various tasks. Each function within PRX is designed to accept zero or more parameters, each parameter being of a specific . These functions also support overloading, enabling them to handle different parameter combinations and return values of specific types. A function can either be used in place of values that correspond to their return value type or directly within rules.
Functions can be utilized as substitutes for values that yield identical return types.
In the preceding example, we've created a variable TEST_VAR
and used the LENGTH
-function to store its length (+5
) into another variable TEST_LEN
.
Another way of using them is by calling them directly.
In this example, we've used the SAY
-function to print text to the SYSPRINT
log file. When we call a function using the CALL
-statement, we effectively create a new rule. More information on rules will be provided in the next chapter.