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.

Calling Sequence

CALL_PROCEDURE, Name [, P 1 , ..., P n ]

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.

P i

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.

Example

The following example shows how to call the PLOT procedure indirectly with a number of arguments. First, create a dataset for plotting by entering:

B = FINDGEN(100)

Call PLOT indirectly to create a polar plot by entering:

CALL_PROCEDURE, 'PLOT', B, B, /POLAR

A "spiral" plot should appear.

See Also

CALL_FUNCTION , EXECUTE