<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"> >I was convinced by August Karlstrom's message</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"> > that intermediate constants
and types as well as</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"> > variables are now disallowed in the 2016 Revision</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"> > of
the Oberon Language report (i.e. Oberon-07/16):</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"> > <a href="http://lists.inf.ethz.ch/pipermail/oberon/2018/011555.html">http://lists.inf.ethz.ch/pipermail/oberon/2018/011555.html</a> </span></font></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"> > However, the PO2013 compiler has not yet been</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"> > modified to disallow them.
Wirth has stated that</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"> > the Oberon Report is the definition of the language</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"> > not the PO2013 compiler. The latter has a number</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"> > of deviations,
restrictions, exceptions and extensions.</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"><br></span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;">The fact is that the PO2013 *compiler* only disallows</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;">access to intermediate variables from nested scopes,</span></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;">but not to intermediate </span><span style="font-family: UICTFontTextStyleBody; white-space: normal; background-color: rgba(255, 255, 255, 0);">constants or types (which are,</span></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;">however, never accessed from nested scopes in the</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;">entire Oberon system anyway, so nobody noticed...)</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;"><br></span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;">And which is why I provided a possible implementation,</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;">which actually complies with the language *report* at:</span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;"><br></span></font></pre><pre><a href="https://github.com/andreaspirklbauer/Oberon-no-access-to-intermediate-objects">https://github.com/andreaspirklbauer/Oberon-no-access-to-intermediate-objects</a></pre><pre><br></pre><pre>So if the Oberon report is the definition,</pre><pre>not the compiler, the compiler would need</pre><pre>to be updated. </pre><pre><br></pre><pre>PS: I find section 10 of the report a bit</pre><pre>ambiguous, but I guess it can be read such</pre><pre>that access to objects (constants, types,</pre><pre>variables) are restricted to the strictly</pre><pre>local or the strictly global level, whereas</pre><pre>intermediate *procedures* can also be called</pre><pre>from within nested scopes.</pre><pre><br></pre><pre>This is what is implemented in the above</pre><pre>repository. An open question is how shadowing</pre><pre>should be handled (one area where the current</pre><pre>Oberon language *report* is ambiguous, so I</pre><pre>decided with the convention used in the past</pre><pre>five decades or so; but it can be debated).</pre><pre>Andreas</pre><pre><br></pre><pre><br></pre><pre><br></pre><pre><br></pre><pre><br></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;"><br></span></font></pre><pre><font face="UICTFontTextStyleBody"><span style="white-space: normal;"><br></span></font></pre><pre><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleBody;"><br></span></pre><div><br></div></body></html>