GPC on Ken Linder's Linux Box wrote:
[...] var s1, s2, s3 : integer; [...] if 10 in [s1, s2, s3] then [...] fooin.pas:8: warning: constructing limited integer set '0..255'
Does this mean I can compare a single ordinal (LHS) to a set with a maximum number of elements of 255 (RHS) ?
Yes. The RHS is - in principle - a `set of integer' as `s1', `s2', and `s3' are integers. GPC truncates this to a `set of 0..255' and warns about this. (Other compilers truncate silently.)
var s1, s2, s3 : 0..255;
solves the problem.
What we can do is to convert the "simple" `in' comparison with just a set constructor on the RHS to an `if (10 = s1) or (10 = s2) or (10 = s3)' statement, thus removing the warning for special cases like this one, but I am not sure that it is worth the effort.
For the future we plan to support "sparse" sets etc., so `set of integer' will simply work. (But better don't hold your breath.;-)
Peter