program keyw; var absolute, external, overload, override, virtual, abstract, reintroduce : integer; begin end .
gpc -fdelphi says:
keyw.p:2: error: `absolute' is a keyword in Borland Pascal keyw.p:2: error: `external' is a keyword in UCSD Pascal, Borland Pascal, keyw.p:2: error: traditional Macintosh Pascal keyw.p:2: error: `virtual' is a keyword in Object Pascal, Borland Pascal, keyw.p:2: error: traditional Macintosh Pascal
It seems that all of them as treated as "directives" and hence may work also as variable names.
Could some kind soul check how other compilers behave -- if the names are really directives then we should teach gpc to accept them as variable names in those dialects.
MWPascal accepts the program without errors or warnings.
UCSD Pascal (for the Apple II) rejects "external" (error 2, Identifier expected) but accepts the rest.
Regards,
Adriaan van Os