The call expression calls an external function in a library by using the Standard calling convention.
Syntax
The syntax of the call expression is:
call external-function( [actual-parameters] );
The external-function identifier can begin with an uppercase or a lowercase character.
Description
The parameters of the call expression can be passed by value or by reference. (For details, see "
A call expression can:
Be used as an instruction in its own right
Appear as the right-hand side of an assignment
Be part of a more-complex expression (for example, a call could be used as one of the parameters to a method call)
The JADE external function facility passes parameters using the following conventions.
Structured parameter (
Always passed by reference; that is, the address of the
When usage is output or io (which signifies the calling function may update the value), length must be specified in the parameter definition
A function of
A function of
Simple parameter (
Parameter is passed by value when the usage is defined as constant or input
Parameter is passed by reference when the usage is defined as output or io
Example
The following example shows the use of the call expression.
getIniParameter(key: String; default: String): String; vars value : String[100]; begin call GetProfileString("Widgets", key, default, value, value.maxLength); return value; end;
In this example, a fixed-length string is passed to the value parameter. The length of the value parameter string is passed in the length parameter. (This could also have been hard-coded to the length of the value parameter defined in the function signature.)