EXTCALL


7.8.6

 

The EXTCALL instruction allows the PL/B program to execute an external routine that could be written in any other language. The routine must have been previously compiled and linked into the runtime. The instruction uses the following format:

 

 

[label]

EXTCALL

{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 that is 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 that is passed to the routine.

Flags Affected: OVER

Note the following:

  1. The {routine} is required and used by the EXTCALL routine to determine which of possibly several other routines to execute.

  2. Zero or more {parameters} may follow the first variable.

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

  4. Any of the Flags may be affected by an EXTCALL program.

  5. The name of the external module may be specified using the PLB_EXTLIB32 runtime keyword.

  6. See the sample files included on the distribution media for more information concerning EXTCALL.

  7. If a FILEPI instruction is active at the time of the EXTCALL instruction, the FILEPI is terminated.

 

 

See Also: XCALL, WINAPI, System Interface Instructions

 



PL/B Language Reference EXECUTE FORK