<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Giuliano Colla via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Do., 26. Jan. 2023, 18:43:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>I found in a fpc program a statement sort of:</p>
<tt>Type</tt><tt><br>
</tt><tt> TSomeType = (a,b,c)</tt><tt><br>
</tt><tt> TaType = set of TSometype</tt><tt><br>
</tt><tt>var</tt><tt><br>
</tt><tt> setA,setB: TaType;</tt><tt><br>
</tt><tt>.....</tt><tt><br>
</tt><tt><b>if setA * setB = [] then doSomething</b>;</tt><tt><br>
</tt><tt><br>
</tt>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?<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You are operating on *sets*, not enums. Thus you need to look at the documentation about set operators: <a href="https://www.freepascal.org/docs-html/current/ref/refsu49.html#x156-18000012.8.6">https://www.freepascal.org/docs-html/current/ref/refsu49.html#x156-18000012.8.6</a></div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"></div>
</blockquote></div></div></div>