[fpc-pascal] Pascal grammar: Program heading can include parameters
Marco van de Voort
marcov at stack.nl
Thu Jul 1 12:14:27 CEST 2010
In our previous episode, Graeme Geldenhuys said:
> I'm busy writing a Object Pascal grammar section for the Language Reference
> In the ref.pdf (page 144) it says that the PROGRAM line can contain
> 'program parameters', but is ignored by the compiler. Can anybody explain
> these "program parameters" and when and how they were actually used? I'm
> just curious. This obviously stems from the original Pascal days.
In original pascal you had to specify all opened files there, including
This was used by some OSes for their file I/O (e.g. VMS, where afaik the
shell allocates memory and handles for open files). There was also some
functionality for unnamed files (temporary ones).
If you want details, talk to the GPC people, read their docs (or Scott
But usually there were assign() like non standarized workarounds to open
files later than at program start.
> Syntax is as follows:
> Program -> PROGRAM Ident ['(' IdentList ')'] ';'
> ProgramBlock '.'
Strange. Where are the modifiers (deprecated etc)? Or where unit level
modifiers post D7 ?
More information about the fpc-pascal