CALL_METHOD calls the object method specified by Name , passing any additional parameters as its arguments. CALL_METHOD can be used as either a function or a procedure, depending on whether the called method is a function or procedure.

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

Calling Sequence

CALL_METHOD, Name, ObjRef, [, P 1 , ..., P n ]


Result = CALL_METHOD( Name, ObjRef, [, P 1 , ..., P n ])



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


A scalar object reference that will be passed to the method as the Self argument.

P i

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

See Also