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 -- Peter Gerwinski, Essen, Germany, http://home.pages.de/~Peter.Gerwinski/ Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 PGP key on request - 6C 94 45 BE 28 A4 96 - 0E CC E9 12 47 25 82 75 *** Vote against SPAM! ********* http://www.politik-digital.de/spam/ ***