You will find that if you are converting from a Delphi version equal to or before Delhi 2009, the {$Mode Delphi} or -Mdelphi directive does exactly what you want.

On 22-7-2014 3:37, Gennady Agranov wrote:
Hi,

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.

We have a lot of different set types - i really do not want to write set<->integer converter for every set type we have :(

Actually I did find a way - I use ^ and @ and cast pointers,
but is there a way to write general set<->integer converter in FPC that I do not have to worry whether it will work or not?

And what actually -CPPACKSET=0 does - documentation is not clear - at least for me :)

Thanks,
Gennady
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to