To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
The CALL statement can be used to invoke a function within a 4GL application. It can be 4GL functions, C functions, or ESQL/C functions. The 4GL functions can be built-in functions or those defined by the programmer.
Programmer-defined 4GL functions can be included within the primary 4GL application file, which contains the MAIN program block, or they can be contained within other .4gl source files and function libraries.
Element |
Description |
Expression |
The name of the function you want to call |
Argument List |
The optional list of arguments which you want to pass to the called function, it can be empty |
Variable List |
It can be any variable of a simple or a structured data type (an element of an array or a record). It cannot be of a large data type. |
Below is an example of calling a programmer-defined function:
MAIN
…
CALL my_function()
…
END MAIN
FUNCTION my_function()
…
END FUNCTION
When 4GL encounters a CALL statement that invokes a programmer defined function, it looks for the FUNCTION program block which corresponds to the function name specified in the CALL statement. A programmer defined function must have a unique name, otherwise 4GL will not be able to define which function to invoke and an error will occur. If a CALL statement contains the RETURNING clause, the invoked function can return values from the function into the calling routine.
The 4GL functions are not case sensitive and can be specified either in lower case or in upper case letters. The C functions are case sensitive; they must be specified in lower case letters.