[Oberon] OBNC Sets incorrect output

Joerg joerg.straube at iaeth.ch
Sun Mar 20 18:35:33 CET 2022


Joe

Most probably the compiler itself is not compiled with --c-int-type=long. The difference between the first and the second are the set constants.

To check my assumption try:
> MODULE testsets;
> IMPORT Out;
> VAR
>   i  : INTEGER;
>   x,y,z : SET;
> BEGIN
>   x := {}; INCL(x, 31); INCL(x, 32); INCL(x, 33);
>   y := {}; INCL(y, 33); INCL(y, 34); INCL(y, 35};
>   z := x - y;  
>   FOR i := 31 TO 35 DO
>     IF i IN z THEN 
>       Out.Int(i,4) 
>     END
>   END;   
>   Out.Ln
> END testsets.

If this solved the output and you have access to the source, you could try to re-compile the compiler with the long flag turned on.

br
Jörg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20220320/532e5b36/attachment.html>


More information about the Oberon mailing list