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 enco

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 123

Re: [fpc-pascal] Floating point question

2024-02-08 Thread Jonas Maebe via fpc-pascal
On 05/02/2024 01:31, James Richters via fpc-pascal wrote: So I need to do this? AA = Extended(8427+Extended(33/Extended(1440.0))); Just typecasting 1440.0 to extended should be enough. This is inconsistent, why didn't the 1440.1 version reduce to a single? Because 1440.1 cannot be represen

Re: [fpc-pascal] Floating point question

2024-02-08 Thread Jonas Maebe via fpc-pascal
On 06/02/2024 16:23, James Richters via fpc-pascal wrote: Great if -CF80 worked, but even if you are happy with -CF64, my problem is: how is anyone coming into FPC after 2.2 supposed to know that their constants that always worked before are going to no longer be accurate?? By reading the rele

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
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

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. ___ fpc-pasca

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

[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 3.2.2