[Oberon] Life without local procedures

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Fri Feb 23 12:20:22 CET 2018

  >I was convinced by August Karlstrom's message
  > that intermediate constants and types as well as
  > variables are now disallowed in the 2016 Revision
  > of the Oberon Language report (i.e. Oberon-07/16):
  > http://lists.inf.ethz.ch/pipermail/oberon/2018/011555.html 
  > However, the PO2013 compiler has not yet been
  > modified to disallow them. Wirth has stated that
  > the Oberon Report is the definition of the language
  > not the PO2013 compiler. The latter has a number
  > of deviations, restrictions, exceptions and extensions.

The fact is that the PO2013 *compiler* only disallows
access to intermediate variables from nested scopes,
but not to intermediate constants or types (which are,
however, never accessed from nested scopes in the
entire Oberon system anyway, so nobody noticed...)

And which is why I provided a possible implementation,
which actually complies with the language *report* at:


So if the Oberon report is the definition,
not the compiler, the compiler would need
to be updated. 

PS: I find section 10 of the report a bit
ambiguous, but I guess it can be read such
that access to objects (constants, types,
variables) are restricted to the strictly
local or the strictly global level, whereas
intermediate *procedures* can also be called
from within nested scopes.

This is what is implemented in the above
repository. An open question is how shadowing
should be handled (one area where the current
Oberon language *report* is ambiguous, so I
decided with the convention used in the past
five decades or so; but it can be debated).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20180223/fcf71445/attachment.html>

More information about the Oberon mailing list