Cambridge ALGOL 68C: Difference between revisions

no edit summary
No edit summary
Line 1:
{{implementation|ALGOL 68}}
===The <codett>ENVIRON</codett> and <codett>USING</codett> clauses.===
These clauses are kind of the ''inverse'' of the '''#include''' found in the [[C|C programming language]], or '''import''' found in [[Python]]. The purpose of the <codett>ENVIRON</codett> 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.
==== Example of <codett>ENVIRON</codett> clause ====
A file called ''mylib.a68'':
<pre>
Line 15:
END
</pre>
==== Example of <codett>USING</codett> clause ====
A file called ''usemylib.a68'':
<pre>
Line 30:
== Restrictions to the language from the standard '''ALGOL 68''' ==
* no algol68 FLEX and variable length arrays.
* <codett>MODE STRING</codett> implemented without FLEX.
* The PAR parallel clause was not implemented.
* nonstandard transput.