Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-04

trash after program end. => no warning, no error

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

Is that intended?
If you have anything following after the final "end." (with a dot), then it is silently ignore, no error, no warning.

>>>>Start
program Project1;
begin
end.
xxx
<<<<<<End
Will compile just fine, besides the 'xxx'.

I did put by accident the "export" section of a library there. Took me ages to figure out why it wasn't working.

Martin

Reply by email

Sven Barth
to Jonas Maebe
Jonas Maebe wrote 6 lines
On 27 Apr 2011, at 20:01, Martin wrote: > Is that intended? Yes, that's how the Pascal language is defined.

At least Delphi prints a warning that text behind "end." is ignored.

Regards,
Sven

Reply by email

Michael Van Canneyt
to Sven Barth
Sven Barth wrote 9 lines
On 27.04.2011 20:06, Jonas Maebe wrote: > > On 27 Apr 2011, at 20:01, Martin wrote: > >> Is that intended? > > Yes, that's how the Pascal language is defined. At least Delphi prints a warning that text behind "end." is ignored.

If I remember correctly, on the mainframe you could put the input for the program after the final end.

Michael.

Reply by email