call Expression

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 "Defining External Functions", in Chapter 8 of the JADE Development Environment User’s Guide. See also "Calling External Functions from JADE Thin Clients", in Chapter 1 of the JADE External Interface Developer’s Reference.)

A call expression can:

The JADE external function facility passes parameters using the following conventions.

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.)