Call an external subroutine or function

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
XCALL subroutine([argument, …])



The name of an external subroutine or function to which control will be transferred.


(optional) A list of one or more arguments that are passed to the subroutine or function.
(a or n)


The XCALL statement transfers control to an external subroutine or user‑defined function. (It cannot be used to call system‑supplied functions.) Upon return from the subroutine or function, control is transferred to the statement following the XCALL statement.


Any ONERROR traps set in the calling program are disabled while the external subroutine is being processed. Once control returns to the calling program, the error traps are re‑enabled.

See also

Writing and calling subroutines and functions.


See USING‑ENDUSING for an example that uses the XCALL statement.