[fpc-pascal] how to expand a set?

Santiago A. svaa at ciberpiula.net
Wed Jun 15 20:33:12 CEST 2016

El 15/06/2016 a las 18:20, wkitty42 at windstream.net escribió:

>>> how is a set of sets defined?
>> No
> hunh?

I meant, you can't. A set is not an ordinal type, but an structured
type, so a set of sets is impossible.

> yup...
>   if (this.messages.area.num in UsersMsgTaggedAreas) then
>     begin
>       ScanForNewMessages(this.messages.area.num);
> ScanForUserMessages(this.messages.area.num,this.user.name,this.user.nick);
>     end
>   else
>     inc(this.messages.area);
>  ;)

That will work as long as UsersMsgTaggedAreas  is restricted to 256
different values or less.
And, not sure, but I think if num is out of the range of values of
UsersMsgTaggedAreas's base type  then the 'in' test won't result true or
false, but an error.


Santiago A.

More information about the fpc-pascal mailing list