<div dir="ltr"><div dir="ltr">On Wed, Dec 20, 2023 at 5:50 AM August Karlstrom <<a href="mailto:fusionfile@gmail.com">fusionfile@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In two recent threads we have discussed scopes and local procedures in <br>
Oberon-07. One thing that I have been thinking about is that since the <br>
change was made to prevent access to intermediate scopes the restriction <br>
that a local procedure cannot be assigned to a procedure variable or <br>
passed as a procedure parameter no longer makes any sense. The sentence<br>
<br>
"P must not be declared local to another procedure, and neither can it <br>
be a standard procedure."<br>
<br>
in section 6.5 should be replaced with<br>
<br>
"P cannot be a standard procedure."<br><br></blockquote><div><br></div><div>I disagree. Consider this example:</div><div><br></div><font face="monospace" size="4">MODULE ProcVars1;<br><br>TYPE <br> ProcType = PROCEDURE();<br><br>VAR<br> p2: PROCEDURE;<br><br>PROCEDURE GlobalP;<br>BEGIN<br>END GlobalP;<br> <br>PROCEDURE P1;<br><br> PROCEDURE P;<br> BEGIN<br> END P;<br><br>BEGIN<br> P(); (* Valid *)<br> p2 := P; (* Not valid because "P is declared local to another procedure" i.e. P1 *) <br> p2 := GlobalP; (* Valid *)<br>END P1;<br><br>END ProcVars1.</font><br><div> </div><div>Regards,</div><div>Chris Burrows</div><div>CFB Software</div><div><a href="https://www.astrobe.com">https://www.astrobe.com</a></div><div><br></div></div></div>