2 Mar
2006
2 Mar
'06
6:26 p.m.
Pascal Viandier wrote:
> By "garbage" I mean something that is not Pascal code.
Me too.
Again, please write *BELOW* quotes, thanks.
> The sample code bellow illustrates what I mean:
>
> Beginning of source>>
> Program GarbageAfterDot;
> Begin
> WriteLn('Ok');
> End.
>
> This line is not processed by GPC when -fignore-garbage-after-dot is on
> command-line.
>
> <<End of source
>
> This program compiles, links and executes properly only if
> "-fignore-garbage-after-dot" is on command-line, even if the last line has
> nothing to do with Pascal code. Also, the word "garbage" is contained in the
> command-line switch :-)
I was referring to the ISO that you quoted. (The references really
get messed up due to the top-posting, as you see.) ISO doesn't
mention garbage, neither literally, nor in the meaning of it
(AFAICS).
> > De : gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] De la part de Frank Heckenbach
> >
> > Pascal Viandier wrote:
> >
> > > For sure I read paragraph 6.13 of ISO 10206 before asking your advice.
> > > I must say, for me the Note 1:
> > >
> > > :1 This International Standard constrains the order of program-components of
> > > : a conforming program only by the partial ordering defined by 6.2.2.9. A
> > > : further restriction by a processor on the order of program-components can
> > > : be justified only by subclause 1.2 a).
> > >
> > > does not state "clearly" one can freely put garbage in his/her source code
> > > provided that it is after the final "End." :-)
> > > I admire people like you who can see clearly something in a so cryptic text
> > - at
> > > least for me -. This kind of things keeps me humble.
> > >
> > > > De : gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] De la part de Waldek
> > Hebisch
> > > >
> > > > There is reference in ISO 10206: see 6.13, especially rule for program-
> > block.
> > > > AFAICS the compiler is required to accept multi-module program in a single
> > > > file. In particular Note 1 to 6.13 clarily states that "useless" modules
> > > > may follow main program.
> >
> > I don't think it says you can put garbage after the `end.', but only
> > useless, i.e. unused, modules, as Waldek said. In fact the syntax
> > rules above this paragraph say:
> >
> > program = programÂblock .
> > programÂblock = programÂcomponent { programÂcomponent } .
> > programÂcomponent = mainÂprogramÂdeclaration `.'
> > | moduleÂdeclaration `.' .
> >
> > Nothing about garbage there.
Frank
--
Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8