<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=""><span class="" style="font-family: monospace; white-space: pre-wrap;"> > That may be so but may also be irrelevant. I can't think of any genuine use</span><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;"> > for an intermediate TYPE if intermediate variables of that type are inaccessible.
>
> Can you refer me to an existing real-world practical Oberon example where an</span></div><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;"> > intermediate type is accessed in a nested procedure?
>
> Chris<br class=""></span><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;"><br class=""></span></div><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;">I can’t think of any! </span><span class="" style="font-family: monospace; white-space: pre-wrap;">In a previous post I have provided an implementation that</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">PO2013 makes the compiler </span><span style="font-family: monospace; white-space: pre-wrap;" class="">consistent in the sense that ALL intermediate objects</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">(constants, </span><span style="font-family: monospace; white-space: pre-wrap;" class="">types, procedures) </span><span style="font-family: monospace; white-space: pre-wrap;" class="">are now treated identically with respect</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">to *access rights*, i.e. </span><span style="font-family: monospace; white-space: pre-wrap;" class="">they cannot be </span><span style="font-family: monospace; white-space: pre-wrap;" class="">accessed in a nested procedures.</span></div></div><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;"><br class=""></span></div><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;">A separate question is of course whether one should allow the ability to *declare*</span></div><div class=""><span class="" style="font-family: monospace; white-space: pre-wrap;">local </span><span class="" style="font-family: monospace; white-space: pre-wrap;">types or constants </span><span style="font-family: monospace; white-space: pre-wrap;" class="">at all - it makes of course sense to </span><span style="font-family: monospace; white-space: pre-wrap;" class="">keep that possibility.</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">But if local procedures were *eliminated* from the language one day, </span><span style="font-family: monospace; white-space: pre-wrap;" class="">then the whole</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">access discussion goes </span><span style="font-family: monospace; white-space: pre-wrap;" class="">away completely, since in that case intermediate objects (of</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">any </span><span style="font-family: monospace; white-space: pre-wrap;" class="">kind!) simply can no longer exist. There can only be (a) global objects or (b)</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">objects that are </span><span style="font-family: monospace; white-space: pre-wrap;" class="">local to (globally declared) procedures.</span></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">As I said, one can endlessly debate all this…</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div></body></html>