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:
> >
> >
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
_
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
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
-
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 "
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.
___
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
___
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