Eike Lange wrote:
In our department, we have a little conversion about Pascal-Standards:
Is the following allowed and should the program be compiled if the unit and the program share the same file? It seems, that GPC does and TurboPascal (tm) does not AFAIK.
8<---------------- unit foo;
interface ... implementation ... end.
program bar; uses foo;
begin ... end.
Why would you use a unit at all if in the same file? You should simply incorporate the code in the program. Units are nothing to do with any standard anyhow, I believe that ISO10206 uses modules while ISO7185 doesn't provide for separate compilation. Turbo Pascal has historically ignored (and contravened) standards. If I am wrong I am sure I will be loudly corrected.