[fpc-devel] Can no longer convert Set of Enum to Integer (on latest SVN ... as of 5-10 minutes ago)

Marco van de Voort marcov at stack.nl
Fri Jun 6 13:30:29 CEST 2014


In our previous episode, Den said:
> -----------
> 
> Type TSomeEnumSet = Set OF (seOne, seTwo, seThree, seFour);
> 
> Var SomeSet : TSomeEnumSet;
> 
> Begin
>    Writeln(Integer(SomeSet) );
> End.
> 
> -----------
> 
> Results in: Error: Illegal type conversion: "TSomeEnumSet" to "LongInt"
> 
> -----------
> 
> This should be possible (in the documentation for a set " The compiler 
> stores small sets (less than 32 elements) in a Longint"), what has 
> changed? (using latest SVN as of 5-10 minutes ago :p)

Maybe change mode? (delphi instead of objfpc?)

Print sizeof someset.



More information about the fpc-devel mailing list