Programming Guide



call

Executes an installed function or JPL procedure

Synopsis

call executable[([argList])]

Arguments

executable
The name of an installed function or JPL module or procedure.

Refer to "Precedence of Called Objects" in Application Development Guide for more information on how Panther resolves this argument.

argList
One or more comma- or space-delimited arguments optionally to pass to parameters in executable. Enclose the entire argument list in parentheses. You can pass the following as arguments:

Description

The call command can call one of the following executables:

When Panther gets a call command, it must ascertain whether the executable is a JPL module or procedure, or an installed function. Panther looks for executable's name first among all built-in and installed functions, then among JPL modules and procedures. Refer to "Precedence of Called Objects" in Application Development Guide for more information on how Panther searches among JPL modules and procedures. If no match is found, Panther issues an error message.

Panther evaluates the call statement to its return value–either integer, string, or double, according to the procedure definition. Therefore, you can implicitly call a function within an expression and gets its return value as follows:

vars i
i = myproc (a,b)

Panther assumes that the executable has the same number and type of parameters. Panther passes arguments by value, so changes to the receiving parameter's value leave its corresponding caller's argument unchanged. If the executable is an installed function, you can pass it hex, binary or octal numbers.

You can install C functions so that arguments can be passed by value. Refer to "Installing Functions"in Application Development Guide for information about installation options.

If you pass a variable's name, you can use Panther library functions to change the contents of the variable. For example, if you pass a field name to a prototyped function, the function can change the field's contents by using sm_n_putfield.