ALGOL 68C - ALGOL 68C Extensions To Algol 68 - The ENVIRON and USING Clauses.

The ENVIRON and USING Clauses.

Separate compilation in ALGOL 68C is done using the ENVIRON and USING clauses. The ENVIRON saves the complete environment at the point it appears. A separate module written starting with a USING clause is effectively inserted into the first module at the point the ENVIRON clause appears.

ENVIRON and USING are useful for a top-down style of programming, in contrast to the bottom-up style implied by traditional library mechanisms.

These clauses are kind of the inverse of the #include found in the C programming language, or import found in Python. The purpose of the ENVIRON mechanism is to allow a program source to be broken into manageable sized pieces. Note that it is only necessary to parse the shared source file once, unlike a #include found in the C programming language where the include file needs to be parsed for each source file that includes it.

Read more about this topic:  ALGOL 68C, ALGOL 68C Extensions To Algol 68