<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Il 26/01/2023 18:52, Sven Barth via fpc-pascal ha scritto:<br>
<blockquote type="cite"
cite="mid:CAFMUeB_=rwG4+__fbh7zw144S=_jVo4kSN6Z7CF8rBSU=rceGw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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"
moz-do-not-send="true">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"
moz-do-not-send="true">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">
</blockquote>
</div>
</div>
</div>
</blockquote>
Thanks a lot,<br>
<br>
Giuliano<br>
</body>
</html>