[Oberon] OBNC Sets incorrect output

Joe Turner medianjoe at mailfence.com
Sun Mar 20 19:01:31 CET 2022


Jorg,

Thanks for the suggestion. Unfortunately the output isn't as expected; only 31 was printed. I'll contact the author about the issue.
cheers,
Joe

March 20, 2022 6:35:33 PM CET Joerg <joerg.straube at iaeth.ch> wrote:
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

--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon

-- Sent with https://mailfence.com  Secure and private email
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20220320/ca9184ae/attachment.html>


More information about the Oberon mailing list