Functions [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
Functions
Functions are similar to subroutines in a conventional programming
language. When a function ends, control returns to the item that called
the function. Functions use the same constructs, and generally the same
commands, as processes.
The function you are about to create is executed by the screen logic as
an after function for a field on the screen. This means that it is
executed after the user enters data to the screen field.
Functions can also be called from a function key or through a VISIT
command in any logic block, as well as a number of other methods. It's
important to remember that a function does not alter the application
environment when it's called.
Developing a function is similar to developing a process. You must
define the header first, and then the details. A function must be
generated before the application can use it.
Every logic command except the MODE command can be used in a function.
The MODE command is only permitted in a process.
MPE/iX 5.0 Documentation