Am 2014-12-31 um 17:30 schrieb Jürgen Hestermann:

Am 2014-12-31 um 16:55 schrieb Joost van der Sluis:
On 12/31/2014 04:40 PM, Jürgen Hestermann wrote:
type FlagType        = (Flag1,Flag2);
          FlagSetType   = set of FlagType;
var i : SizeInt;
       S : FlagSetTyp;

S := [Flag1];
i := byte(S); // <---- Error "illegal type conversion"

i := ord(S); ?

But it's still invalid, though. A set can contain more then 32 items, and then 
your conversion does not hold anymore.

It seems that now FlagType is always 4 bytes in size while it was 1 byte in 
DELPHI mode.
That's a real problem because I have stored (and reread) these sets from a 
binary file
which now fails because of the larger set size.
Is this realy compiler mode dependent?
I can't find any documentation about this.
Sorry, I meant that FlagSETType seems to be 4 bytes now.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to