On Wed, Mar 01, 2006 at 02:42:11PM -0500, Pascal Viandier wrote:
I encountered an unexpected error with GPC when compiling a Pascal source that contains "some text" (not Pascal code) after the final "End." of the program. GPC tries to compile this extra text and finds syntax errors in it.
Although I did not see any reference to this in ISO 10206, I think it could be a nice feature for GPC to ignore everything after the final "End." in a program or a unit since nothing useful for it should be there.
Another interpretation: if something _is_ there, it is not useful, and thus suspect of being erroneous, in which case an error message might help. Silly example:
program foo;
type qwe = record rty: integer; uio: char end;
var enf: qwe;
begin enf.rty := 42; end.uio := 'a'; ... etc, do stuff with enf... end.
Emil Jerabek