[Oberon] FPGA - Pointers to [named] records only
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Thu Aug 2 08:38:49 CEST 2018
> `ORP' is now less forgiving, as I needed to change the above to
>
> TYPE
> (* Depth=1 only *)
> ColorTable = POINTER TO ColorTableDesc;
> ColorTableDesc = RECORD
> i: ARRAY 2 OF RECORD red, green, blue: BYTE END
> END;
This change to the official compiler was made on 26.9.2017.
It became necessary because no type descriptors are created
in Oberon for *anonymous* records, so when the programmer
calls NEW in such cases, the garbage collector would break.
One could have decided to *also* create type descriptors for
anonymous records (I have done that in a test implementation),
but requiring pointers to always point to *named* records was
deemed quite acceptable. And also improves readability a little.
-ap
More information about the Oberon
mailing list