[fpc-pascal] Pascal grammar: Program heading can include parameters

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Jul 1 12:21:15 CEST 2010


Op 2010-07-01 12:14, Marco van de Voort het geskryf:
> 
> In original pascal you had to specify all opened files there, including
> input/output.

Thanks for that history. :)

>> Syntax is as follows:
>>
>>   Program -> PROGRAM Ident ['(' IdentList ')'] ';'
>>              ProgramBlock '.'
> 
> Strange. Where are the modifiers (deprecated etc)? Or where unit level
> modifiers post D7 ?


As far as I know modifiers are not allowed in a Program unit, only in a
Unit unit. FPC's ref.pdf and Kylix 3 lang ref doc seem to confirm this.

Here is the grammar for a UNIT.


Unit -> UNIT Ident [PortabilityDirective] ';'
        InterfaceSection
        ImplementationSection
        InitSection '.'

...

PortabilityDirective -> platform
                     -> deprecated
                     -> library



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-pascal mailing list