[fpc-devel] Fpc does not allow Chr() in type definition. Bug?

Anton Shepelev anton.txt at gmail.com
Sun Nov 8 22:04:34 CET 2020


Bart:

> Type
>   SubRange = Chr(1)..Chr(2);
> begin
> end.
>
> This compiles in TP 6.0 and Delphi 7.0, but fpc doesn't.

It also compiles in BP 7.0, but why? I think it can work
only if the compiler treats Chr(1) as a macro, not as a
function. Does any dialect Pascal allow function invocations
in type definitions?



More information about the fpc-devel mailing list