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

2024-02-10 Thread Sven Barth via fpc-pascal
Ralf Quint via fpc-pascal schrieb am Fr., 9. Feb. 2024, 20:36: > On 2/8/2024 11:01 AM, Martin Wynne via fpc-pascal wrote: > > Hi Thomas, > > > > The error is not the file content after "end.". > > > > The error is not having the expected "end;" after "begin". > > > > This works ok: > > > >

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

2024-02-09 Thread Ralf Quint via fpc-pascal
On 2/8/2024 11:01 AM, Martin Wynne via fpc-pascal wrote: 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 _

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

2024-02-08 Thread Travis Siegel via fpc-pascal
No, the original post has the correct program, dropping a ";" in that spot is incorrect syntax. The problem comes in because there is an open comment, but no close comment.  If you add the closing } the compiler behaves properly. On the other hand, I do understand that once the "end." is

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

2024-02-08 Thread Sven Barth via fpc-pascal
Martin Wynne via fpc-pascal schrieb am Do., 8. Feb. 2024, 22:03: > 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

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

2024-02-08 Thread Thomas Kurz via fpc-pascal
- From: Martin Wynne via fpc-pascal To: fpc-pascal@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 "

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

2024-02-08 Thread Martin Wynne via fpc-pascal
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. ___

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

2024-02-08 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Do., 8. Feb. 2024, 13:31: > Hello all, > > I'm unsure about whether or not to report this as a bug. Imho, it is a > bug, but maybe there's a good reason to handle this. > Please report a bug. Regards, Sven ___

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

2024-02-08 Thread Thomas Kurz via fpc-pascal
Hello all, I'm unsure about whether or not to report this as a bug. Imho, it is a bug, but maybe there's a good reason to handle this. Please take the following example: ---start--- program test; begin end. { ---end--- Result: Z:\>ppc386.exe testproj.pas Free Pascal Compiler version