next up previous contents
Next: The following are Up: Eventual Previous: Variable typing

Use of COMMON and STRUCTURE

DEC FORTRAN allows the use of a record type structure similar to that found in C or Pascal. This allows a number of related data items of varying type and size to be grouped under a single name and then passed around different subroutines of an application as a single argument. This makes for a more visible way of passing the information around as compared with the back-door method of pushing it into global variables within COMMON blocks. Some restraint should be employed, however, and in general structures should only be used where the information they contain is to be widely distributed throughout an application. They should not be used just as a shorthand way of passing several arguments between two or three routines - use discrete arguments.

COMMON should only be used where absolutely necessary. There are probably a couple of instances where this might be the case:



Web Master
Wed Oct 8 09:22:15 BST 1997