[Lazarus] Typecast set to byte in mode OBJFPC
Jürgen Hestermann
juergen.hestermann at gmx.de
Wed Dec 31 16:56:27 CET 2014
Am 2014-12-31 um 16:40 schrieb Jürgen Hestermann:
> ---------------------------------------------------------------
> type FlagType = (Flag1,Flag2);
> FlagSetType = set of FlagType;
> var i : SizeInt;
> S : FlagSetTyp;
>
> S := [Flag1];
> i := byte(S); // <---- Error "illegal type conversion"
> ---------------------------------------------------------------
I have already found a solution:
i := SizeInt(S);
works (although I don't know why this is accepted but byte(S) is not).
More information about the Lazarus
mailing list