[fpc-devel] How to convert set to integer and vice versa

Marco van de Voort marcov at stack.nl
Tue Jul 22 11:14:31 CEST 2014


In our previous episode, Gennady Agranov said:
> I am new to FPC, but I do like it - thanks!
> 
> We are trying to switch from Delphi to FPC, but I am stuck with the 
> following issue - in Delphi you can cast "set" to "integer" and get it 
> back later - again by casting. In our case it is used for persistence 
> purposes.

Good. And afaik in Delphi mode this works too in FPC? Did you test?
 
> And what actually -CPPACKSET=0 does - documentation is not clear - at 
> least for me :)

The $PACKSET directive takes a numeric argument of 1, 2, 4 or 8. 

Not mentioned in the documentation means undefined.



More information about the fpc-devel mailing list