[Oberon] SystemV- Heap + Module Space

Skulski, Wojciech skulski at pas.rochester.edu
Thu Jan 3 17:17:24 CET 2019


I thought that a robust programming style would use named constants defined in one "include" file. Would be an import in case of Oberon.

IMPORT ErrorCodes;
ELSIF res = ErrorCodes.MODULE_LOAD_FAILURE THEN importing := name;

Or perhaps define the codes in the same module, if they are local:

CONST MODULE_LOAD_FAILURE = 3; (*defined at the top of the same module*)

Looking at "ELSIF res = 3" I start wondering about C programming culture. Are those guys crazy when they insist on named constants?

Tomas wrote:
> ELSIF res = 3 THEN importing := name;
>           WHILE nofimps > 0 DO DEC(nofimps);
> DEC(import[nofimps].refcnt) END

Aha, changing it to
ELSIF (res = 3) OR (res = 7) THEN ...

More information about the Oberon mailing list