<div style='font-family:arial; font-size:13px;'><div>Hi Jorg,</div><div><br></div><div>Sorry, I don't understand your point. I know that the set size is 32 {0..31} but if if OBNC is built with --c-int-type=long it should be 64 {0..63}. So why is my code not giving the correct output for sets which contain elements > 31?<br></div><br><div dir="auto">March 20, 2022 12:20:44 PM CET "Jörg" <joerg.straube@iaeth.ch> wrote:<blockquote type="cite" cite="<EA89DE59-85C2-470E-9DF9-759139E833C1@iaeth.ch>">If the largest set element is 31, the set size is 32 {0..31}<div>Jörg<br><div dir="ltr"><br><blockquote type="cite">Am 20.03.2022 um 10:37 schrieb Joe Turner <medianjoe@mailfence.com>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div style="font-family:arial; font-size:13px;"><div>If you build OBNC on a 64 bit system with --c-int-type=long you can use integers between 0-63 in sets. I confirmed this using the code provided on the FAQ page at the OBNC site (slightly modified because I removed the procedure):</div><div><br></div><div><br></div><div>MODULE setSize;<br>IMPORT Out;<br>VAR<br>  x : INTEGER;<br>  s : SET;<br>BEGIN<br>  x := -1;<br>  s :=-{};<br>  REPEAT<br>    INC(x);<br>    EXCL(s,x)<br>  UNTIL s = {};<br>  Out.Int(x,4);<br>  Out.Ln<br>END setSize.</div><div><br></div><div>The output is 63.<br></div><div><br></div><div>However, the following code should produce the output : 31  32. <br></div><div><br></div><div>MODULE testsets;<br>IMPORT Out;<br>VAR<br>  i  : INTEGER;<br>  x,y,z : SET;<br>BEGIN<br>  x := {31,32,33};<br>  y := {33,34,35};<br>  z := x - y;  <br>  FOR i := 31 TO 35 DO<br>    IF i IN z THEN <br>      Out.Int(i,4) <br>    END<br>  END;   <br>  Out.Ln<br>END testsets.</div><div><br></div><div>But it doesn't. The output is 31. Other set operations also produce output limited to a maximum set size of 31. <br></div></div>

-- 
Sent with https://mailfence.com  
Secure and private email
<span>--</span><br><span>Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems</span><br><span>https://lists.inf.ethz.ch/mailman/listinfo/oberon</span><br></div></blockquote></div><pre style="font-size:13px;">--<br>Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems<br><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br></pre></blockquote></div></div>

-- 
Sent with https://mailfence.com  
Secure and private email