[Oberon] FPGA - Pointers to [named] records only
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
> (* Depth=1 only *)
> ColorTable = POINTER TO ColorTableDesc;
> ColorTableDesc = RECORD
> i: ARRAY 2 OF RECORD red, green, blue: BYTE 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.
More information about the Oberon