[fpc-pascal] star operator on enum types
Sven Barth
pascaldragon at googlemail.com
Thu Jan 26 18:52:41 CET 2023
Giuliano Colla via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Do., 26. Jan. 2023, 18:43:
> I found in a fpc program a statement sort of:
> Type
> TSomeType = (a,b,c)
> TaType = set of TSometype
> var
> setA,setB: TaType;
> .....
> *if setA * setB = [] then doSomething*;
>
> which I found very smart to detect if the two sets have some common
> elements, but I've been unable to find in the fpc documentation how the *
> operator is overloaded in fpc when dealing with enumerated and sets of
> enumerated types. Should I find out by trial and error or it's written
> somewhere?
>
You are operating on *sets*, not enums. Thus you need to look at the
documentation about set operators:
https://www.freepascal.org/docs-html/current/ref/refsu49.html#x156-18000012.8.6
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230126/b05dc90e/attachment.htm>
More information about the fpc-pascal
mailing list