CALL_PROCEDURE

CALL_PROCEDURE calls the procedure specified by Name, passing any additional parameters as its arguments.

Although not as flexible as the EXECUTE function, CALL_PROCEDURE is much faster. Therefore, CALL_PROCEDURE should be used in preference to EXECUTE whenever possible.

The COMPILE_CODE procedure may be used to create IDL procedures at run-time.

Example

The following example shows how to call the PLOT procedure indirectly with a number of arguments:

CALL_PROCEDURE, 'PLOT', FINDGEN(100), FINDGEN(100), /POLAR

A “spiral” plot should appear.

Syntax

CALL_PROCEDURE, Name [, P1, ..., Pn]

Arguments

Name

A string containing the name of the procedure do be called. This argument can be a variable, which allows the called procedure to be determined at runtime.

Pi

The arguments to be passed to the procedure given by Name. These arguments are the positional and keyword arguments documented for the called procedure, and are passed to the called procedure exactly as if it had been called directly.

Version History

Pre 4.0

Introduced

See Also

CALL_FUNCTION, CALL_METHOD, COMPILE_CODE, EXECUTE