Procedure Interface

If a prototyped program or procedure has call parameters or a return value, then a procedure interface definition must be defined, either in the main source section (for a cycle-main procedure) or in the subprocedure section. If a prototype was specified, the procedure interface definition repeats the prototype information within the definition of a procedure. Otherwise, the procedure interface provides the information that allows the compiler to implicitly define the prototype. The procedure interface is used to declare the entry parameters for the procedure and to ensure that the internal definition of the procedure is consistent with the external definition (the prototype).

The following rules apply to procedure interface definitions.

TIP

If a module contains calls to a prototyped program or procedure that is defined in a different module, then there must be a prototype definition for each program and procedure that you want to call. One way of minimizing the required coding is to store shared prototypes in /COPY files.

If you provide prototyped programs or procedures to other users, be sure to provide them with the prototypes (in /COPY files) as well.



[ Top of Page | Previous Page | Next Page | Contents | Index ]