next up previous contents index
Next: The Compiler and Runtime Up: Program Structure Previous: The ZPL Module

External Procedures

       

ZPL programs can invoke procedures written in C and other languages that use the same procedure call interface and object file format.

Because C allows data types that are not found in ZPL, two special data types are provided exclusively for declaring prototypes of external C procedures: procedure and region. These data types allow procedures and regions to be passed as parameters to C procedures.

        ZPL programs treat sequential and parallel C procedures differently. Sequential procedures are treated just as sequential ZPL procedures. Thus, they can be promoted and any regions or masked regions will correctly apply to them. Any external procedure that is declared to accept parallel variables is considered to be a parallel procedure. Regions and masked regions have no effect on external parallel procedures. The assumption being that if an external procedure expects a parallel parameter, that procedure will itself be managing parallelism.



Kay Nettle
Fri Feb 21 21:14:29 CST 1997