[Oberon] Hennessy.Mod 64kB limit

Skulski, Wojciech skulski at pas.rochester.edu
Tue Feb 18 15:45:59 CET 2020


Joerg wrote:

>The 64KB limit is known, but I'm surprised as well that this limit is not checked.
> Add to ORG.CheckRegs the following IF:
>   IF varsize + strx > 0FFFFH THEN ORS.Mark("too many globals") END;

This amounts to a sin. Hardcoded literals are against Niklaus Wirth school of programming. I have picked relevant citations from The Gospel. Why is the community disregarding The Gospel?

This should be:
CONST GLOBLIMIT = 0FFFFH;  (*or GlobLimit, MaxVar, or any good and descriptive name*)

IF varsize + strx > GLOBLIMIT THEN ORS.Mark("too many globals") END;

Shall we ever learn from Niklaus Wirth?

Thanks,
Wojtek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Why_CONST.odc.pdf
Type: application/pdf
Size: 22281 bytes
Desc: Why_CONST.odc.pdf
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200218/413b5fcc/attachment.pdf>


More information about the Oberon mailing list