[fpc-pascal] Syntax error with new FPC SVN
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Sep 30 18:51:39 CEST 2011
On 30 Sep 2011, at 18:27, Paul Ishenin wrote:
> This is probably my fault although:
> 1. delphi does not support such declarations
> 2. we don't have a test for this kind of syntax
>
> So maybe we had a feature by accident?
Set type is defined as "set of ordinal type": http://www.freepascal.org/docs-html/ref/refsu17.html
One kind of ordinal type is a subrange types, which is defined as "constant .. constant": bottom of http://www.freepascal.org/docs-html/ref/refsu5.html
Constants can include typecasts (no actual example given at http://www.freepascal.org/docs-html/ref/refse9.html , but it says that they are simply expressions which the compiler must be able to evaluate at compile time (and typecasted constants can be evaluated at compile time).
So it's documented behaviour, and it's not unclean, dangerous, etc...
> Should I restore that behavior?
I think so, yes.
Jonas
More information about the fpc-pascal
mailing list