[Oberon] Bit-fiddling: SETs and type casts in Oberon-07
Chris Burrows
cfbsoftware at gmail.com
Wed Aug 10 04:19:19 CEST 2022
On Tue, Aug 9, 2022 at 8:37 AM Hans Klaver <hklaver at dds.nl> wrote:
> Concerning this I found out that only OBNC requires a variable as first
> parameter of EXCL and INCL, and disallows SYSTEM.VAL in its place; Wirth's
> OR and the Astrobe compiler have no problem with SYSTEM.VAL as first
> parameter of these procedures. So for instance they accept the following
> (Astrobe with a warning 'type cast !'):
>
> VAR i: INTEGER;
> ...
> EXCL(SYSTEM.VAL(SET, i), 5)
> RETURN i
>
>
However, the Astrobe compiler does not always generate correct code for
this type of example. Following the reasoning in my previous posts on this
subject I have decided to report this (and any use of SYSTEM.VAL passed to
a VAR parameter of a procedure) as an error in the next release of the
Astrobe compilers.
Regards,
Chris Burrows
CFB Software
https://www.astrobe.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20220810/4425517d/attachment.html>
More information about the Oberon
mailing list