Next: Procedure Execution
Up: External Procedures
Previous: Procedure Independence
Information can be transferred to and from an external procedure
by any of three methods.
- An argument list: as shown in the two examples above.
This is the preferred method of interfacing as it is the
most flexible and modular. It is described in detail in
the remainder of this section.
- Common blocks: these are lists of variables or arrays
which are stored in areas of areas of memory shared
between two or more program units. They are useful in
special circumstances when procedures have to be
coupled closely together, but are otherwise less
satisfactory. Common blocks are covered in detail in
section 12.
- External files: interfacing via external files is neither
convenient nor efficient but it is mentioned here to point
out that external files are global. Once a file has been
opened in any program unit it can be accessed anywhere
in the program provided that the appropriate I/O unit
number is available. A unit number can be passed into
a procedure as an integer argument.
Mario Storti
Wed Nov 4 19:32:56 ART 1998