[Oberon] OBNC Sets incorrect output

Joe Turner medianjoe at mailfence.com
Sun Mar 20 16:53:50 CET 2022

It must be a bug, otherwise why would the output of the first module be correct and the second one not?

March 20, 2022 4:01:34 PM CET Diego Sardina <dsar at eml.cc> wrote:On Sun, Mar 20, 2022, at 1:03 PM, Joe Turner wrote:
> 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?

I don't use that compiler but I  guess it's a bug of OBNC and you should
contact the author.

The SET type is a special one and it's not enough to change the underlying type
to support 64 bit values because there are also SET constants like {0, 1, 4 ..
7}. This means also the code generator should be adapted to support 64 bit SET
(and it's a non trivial change).

If you switched to long type just for the SET type, it's better that you use a
library (based on SET).

Diego Sardina

Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems

-- 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/6b3e090e/attachment.html>

More information about the Oberon mailing list