<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Yes. It has nothing to do with unloaded modules. It is a nice example to show the effect of "uninitialized variables".</div><div id="AppleMailSignature">Jörg</div><div><br>Am 01.10.2016 um 02:06 schrieb <<a href="mailto:Aubrey.McIntosh@alumni.utexas.net">Aubrey.McIntosh@alumni.utexas.net</a>> <<a href="mailto:Aubrey.McIntosh@alumni.utexas.net">Aubrey.McIntosh@alumni.utexas.net</a>>:<br><br></div><blockquote type="cite"><div><div dir="ltr">This snipped compiles under Component Pascal 1.7-rc1, and traps with a nil procedure call.<div><div><br></div><div><div>MODULE TempProcvar;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>TYPE</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>ParamProc = PROCEDURE ( p: INTEGER );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>VAR</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>trouble* : ParamProc;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>PROCEDURE UseProc ( method: ParamProc );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>BEGIN</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>method( 42 )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>END UseProc;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>PROCEDURE Doit*;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>BEGIN</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>UseProc (  trouble )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>END Doit;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span></div><div>END TempProcvar.</div></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 6:11 PM, Chris Burrows <span dir="ltr"><<a href="mailto:chris@cfbsoftware.com" target="_blank">chris@cfbsoftware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> -----Original Message-----<br>
> From: Oberon [mailto:<a href="mailto:oberon-bounces@lists.inf.ethz.ch">oberon-bounces@lists.<wbr>inf.ethz.ch</a>] On Behalf Of<br>
</span><span class="">> Stéphane Aulery<br>
> Sent: Friday, 30 September 2016 6:19 AM<br>
> To: ETH Oberon and related systems<br>
> Subject: Re: [Oberon] Oberon for a C++ user.<br>
><br>
> ><br>
</span><span class="">> > I wonder if there is a way out.  Can this problem be solved within<br>
> the Oberon-1 framework?<br>
><br>
> What you say is surprising. There are probably a good reason to<br>
> dismiss this problem. Anybody kwnow why please?<br>
><br>
<br>
</span>I'd like to see actual example code that illustrates the problem as I am not<br>
convinced it is a problem - at least not with the latest version of Oberon.<br>
As Srivas pointed out, e.g. in Project Oberon, if you want to assign an<br>
external procedure to a procedure variable, or you want to reference an<br>
external procedure variable you have to import the module that contains that<br>
procedure / procedure variable. If you have imported that module you can't<br>
unload it until the importing module is unloaded first.<br>
<br>
Oberon-2 does have additional object-oriented features. Maybe they cause an<br>
issue when mixed with the use of procedure variables? Procedure Varaiables<br>
might have been left in the language in the transition from original Oberon<br>
to Oberon-2 simply to avoid breaking backward-compatibility. It is likely<br>
there is no *need* to use procedure variables if you have these additional<br>
features. This is supported by the following quote from Hanspeter<br>
Mossenbock's book 'Object-Oriented Programming in Oberon-2':<br>
<br>
"Dynamic binding has also been known for a long time in the form of<br>
procedure variables. The activation of a procedure variable causes the<br>
invocation of the procedure contained in it at run time. Working with<br>
procedure variables, however, is troublesome and error-prone, while dynamic<br>
binding in object-oriented languages represents an elegant and reliable<br>
solution."<br>
<br>
It is also significant to note that Procedure Variables are documented as<br>
'deprecated' in the .NET version of Component Pascal (the Oberon-2<br>
superset).<br>
<br>
Regards,<br>
Chris<br>
<span class="HOEnZb"><font color="#888888"><br>
Chris Burrows<br>
CFB Software<br>
<a href="http://www.astrobe.com" rel="noreferrer" target="_blank">http://www.astrobe.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/<wbr>mailman/listinfo/oberon</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="'times new roman', serif">(email is my preferred communication media)</font><div><font face="'times new roman', serif">Aubrey McIntosh, Ph.D.<br>1502 Devon Circle<br>Austin TX 78723-1814</font><div><div><span style="line-height:20px;background-color:rgb(255,255,255)"><font face="'times new roman', serif">(512)-348-7401</font></span></div></div><div><div><br></div></div></div></div></div>
</div>
</div></blockquote><blockquote type="cite"><div><span>--</span><br><span><a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems</span><br><span><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a></span><br></div></blockquote></body></html>