[fpc-pascal] "Unexpected end of file" when having an open comment after the final "end."

Thomas Kurz fpc.2021 at t-net.ruhr
Thu Feb 8 22:23:17 CET 2024


Hello Martin,

I've been using Pascal for more than 30 years now, but I must admit I've never before seen the construct you posted.

And it doesn't compile either:

project1.lpr(4,4) Error: Syntax error, "." expected but ";" found

Kind regards,
Thomas


----- Original Message ----- 
From: Martin Wynne via fpc-pascal <fpc-pascal at lists.freepascal.org>
To: fpc-pascal at lists.freepascal.org <fpc-pascal at lists.freepascal.org>
Sent: Thursday, February 8, 2024, 20:01:17
Subject: [fpc-pascal] "Unexpected end of file" when having an open comment after the final "end."

Hi Thomas,

The error is not the file content after "end.".

The error is not having the expected "end;" after "begin".

This works ok:

_________________________

program test;

begin
end;

end.

abc 123

_________________________

Martin.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list