2.2. Program

A program need not be compiled in one unit, but may be divided into segments for separate compilation. To make it possible to refer to chosen objects in different segments, the name and types of such objects are written outside the program segments in communicators. Objects fully defined within the program are rendered accessible to all segments by their mention in a COMMON communicator (see Section 3.3 and see Section 9.1). Objects whose full definition lies outside the program, for example library procedures, can be made accessible to all segments by mention in forms of communicator whose definition will be implementation-dependent. A Coral 66 program will thus comprise

name of program
optional communicators
named segments

in some appropriate sequence. Each program segment is in the form of a block (see Chapter 3). The language definition does not specify how the program or its segments shall be named or how the segments are to be separated or terminated, but when the whole program is compiled together, a typical form might be:

name of program
COMMON etc ;
segment name 1
segment name 2

The program starts running from the beginning of a segment, the choice of which will depend upon a convention or mechanism outside the definition of the language.