IDL

CALL_FUNCTION

CALL_FUNCTION

CALL_FUNCTION function calls the IDL function specified by the string Name, passing any additional parameters as its arguments.

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

Examples


The following command indirectly calls the IDL function SQRT (the square root function) with an argument of 4 and stores the result in the variable R:

R = CALL_FUNCTION('SQRT', 4)

Syntax


Result = CALL_FUNCTION(Name [, P1, ..., Pn])

Return Value


The result of the called function (specified by the string Name) is passed back as the result of this routine.

Arguments


Name

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

Pi

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

Keywords


None.

Version History


Pre 4.0

Introduced

See Also


CALL_PROCEDURE, CALL_METHOD, EXECUTE



Notes


This page has no user notes yet. Be the first one!


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2014 Exelis Visual Information Solutions