<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""><pre style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre-wrap;" class="">Note that even though the Oberon language report of Oberon-07 still states that “If a procedure P is assigned to a procedure variable of type T [...]. P must not be declared local to another procedure”, in </span><span style="white-space: pre-wrap;" class="">the current implementation of Oberon-07, this restriction is not actually checked - at least not in the case when the procedure variable to which a local procedure is assigned is itself declared locally in the same scope, as in the following example:</span></pre><pre style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre-wrap;" class=""> MODULE M;</span></pre><pre style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre-wrap;" class=""><br class=""> PROCEDURE P;<br class=""> VAR p: PROCEDURE;</span></pre><pre style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre-wrap;" class=""> </span><span style="white-space: pre-wrap;" class="">PROCEDURE</span><span style="white-space: pre-wrap;" class=""> </span><span style="white-space: pre-wrap;" class="">Q</span><span style="white-space: pre-wrap;" class="">; </span><span style="white-space: pre-wrap;" class="">BEGIN</span><span style="white-space: pre-wrap;" class=""> </span><span style="white-space: pre-wrap;" class="">END</span><span style="white-space: pre-wrap;" class=""> Q;</span></pre><pre style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre-wrap;" class=""> BEGIN p := Q<br class=""> END P;<br class=""> END M.<br class=""><br class=""></span></pre><pre style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre-wrap;" class="">which compiles correctly under Oberon 2013 without an error message.</span></pre><pre style="background-color: rgb(255, 255, 255);" class="">AP</pre></div><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">--------------------------------------------------------------------------</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">August Karlstrom <a href="mailto:fusionfile@gmail.com" class="">fusionfile@gmail.com</a> Thu Sep 18 12:14:29 CEST 2017</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">In the latest revision of the Oberon language, access to identifiers in
intermediate scopes is denied. Doesn't this imply that the restriction
that only globally defined procedures can be assigned to procedure
variables, is the unnecessary?
-- August
</pre></div><div class=""><br class=""></div></body></html>