Functions in 4GL Programs

In 4GL, a function is a named collection of statements that perform a task.  (In some programming languages, terms like method, subroutine, and procedure correspond to a function in 4GL.) If you need to repeat the same series of operations, you can call the same function several times, rather than specify the same steps for each repetition. This construct supports the structured programming design goal of segmenting source code modules into logical units, each of which has only a single entry point and controlled exit points.

4GL programs can invoke the following types of functions:

The FUNCTION statement defines a function. Variables that are declared within a function are local to it, but functions that are defined in the same module can reference any module-scope variables that are declared in that module.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.