<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=""><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">Addendum: Another way to read the sentence “P must not be declared local to ANOTHER procedure” is that in fact “P may be declared local to the SAME procedure”. This is the case in the example below. Either way, the assignment to procedure variables is not restricted to globally defined procedures.</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">AP</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><br class=""></pre><pre class="" style="background-color: rgb(255, 255, 255);">On 28 Sep 2017, at 18:11, Andreas Pirklbauer <<a href="mailto:andreas_pirklbauer@yahoo.com" class="">andreas_pirklbauer@yahoo.com</a>> wrote:</pre><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div 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></div></div></div></div></blockquote><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class=""><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;"><br class="">  </span><span style="white-space: pre-wrap;" class="">  MODULE M;</span></pre></div></div></div></blockquote><blockquote type="cite" class=""><div 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=""><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></div></blockquote></div><br class=""></body></html>