And I expect that OP's got range checking etc. turned off.
MarkMLl
that’s a bizarre accusation. Why would I not want range checking?
I’m still flabbergasted That it would truncate a set rather than adjust to the size needed.
If your range checking is on but a set is being truncated without warning at either compilation or runtime, my own feeling is that that should be considered an error. But you'd not posted a compilable example or told us exactly how you were building... /fortunately/ we can't all read your mind.
Somebody's mentioned that sets can contain 256 elements, but that is the /maximum/ number they can contain, and the manual is explicit that by default they're a longint... you did read that bit I quoted, didn't you?
So what's happening is that because you hadn't specified a set type it was defaulting to 32 elements, but then- apparently- silently discarding bits from an allocation. That's /wrong/, but at the same time your use of an implicit set type in that parameter list was arguably a bit dodgy... only a bit though, and I can sympathise.
There's a related problem where the shifting operator silently ignores an operand of larger than (I think) 31.
MarkMLl