(Contents)(Previous)(Next)

Calling Functions

The call of a function is introduced by a percentage sign.

Function calls can be used in expressions, but they can also occur as independent statements.

Examples:

Examples:

When used in expressions, the function must return a value to the calling environment via the RETURN statement. If no value is returned, the function yields NULL.

Functions cannot call routines (CALL, SWITCH, and SWITCHCALL statements), but only further functions. The program to which a function is assigned by its name is called a library.

When calling a function, only the module name is specified. SQL-PL looks for the function in the library (program) called STDLIB as the default setting. If another library is to be used, this can be specified in the module options (see chapter Module Options).

Syntax:


(Contents)(Previous)(Next)