XCALL


 

The XCALL instruction allows the PL/B program to execute an externally compiled routine that could be written in any other language. The routine must have been previously compiled and linked into the runtime before this instruction may be used. XCALL is functionally identical to the EXTCALL statement. The instruction uses the following format:

 

 

[label]

XCALL

{routine}[{sep}{parameters}]

 

Where:

label

Optional. A Program Execution Label.

routine

Required. A previously defined Character String Variable or a string Literal that determines the routine executed.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

parameters

Optional. A list of previously defined variables passed to the routine.

Flags Affected: OVER

Note the following:

  1. {routine} is an immediate label that is passed to the XCALL module to determine which of possibly several routines to execute.

  2. Zero or more {parameters} may be specified.

  3. If the XCALL routine has not been linked into the runtime, the OVER flag is set and the next instruction is executed.

  4. Any of the flags could be affected by an XCALL program that has been linked into the runtime.

  5. See the sample files included on the distribution media for more information concerning XCALL.

  6. If a FILEPI statement is active, the FILEPI is terminated if the XCALL routine has been linked into the runtime.

 

 

See Also: WINAPI, System Interface Instructions

 



PL/B Language Reference WINAPI