[Oberon] Oberon for a C++ user.

Chris Burrows chris at cfbsoftware.com
Sat Oct 1 02:29:57 CEST 2016


Yes, of course it does - that is something completely different. 'trouble' has not yet been defined so it fails even though the module is still loaded. A simpler way of illustrating that particular problem in Component Pascal would be:

MODULE TempProcvar;

TYPE
  ParamProc = PROCEDURE ( p: INTEGER );

VAR
  trouble : ParamProc;

  PROCEDURE Run*;
  BEGIN
    trouble(99)
  END Run;
  
END TempProcvar.

Any example that illustrates the problem under discussion would have at least two modules.

> 
> From: aubrey.mcintosh at gmail.com [mailto:aubrey.mcintosh at gmail.com] On
> Behalf Of Aubrey.McIntosh at alumni.utexas.net
> Sent: Saturday, 1 October 2016 9:36 AM
> To: chris at cfbsoftware.com; ETH Oberon and related systems
> Subject: Re: [Oberon] Oberon for a C++ user.
> 
> This snipped compiles under Component Pascal 1.7-rc1, and traps with
> a nil procedure call.
> 
> MODULE TempProcvar;
> 
> 	TYPE
> 		ParamProc = PROCEDURE ( p: INTEGER );
> 
> 	VAR
> 		trouble* : ParamProc;
> 
> 	PROCEDURE UseProc ( method: ParamProc );
> 	BEGIN
> 		method( 42 )
> 	END UseProc;
> 
> 	PROCEDURE Doit*;
> 	BEGIN
> 		UseProc (  trouble )
> 	END Doit;
> 
> END TempProcvar.
> 
> 
> 
> On Fri, Sep 30, 2016 at 6:11 PM, Chris Burrows
> <chris at cfbsoftware.com> wrote:
> > -----Original Message-----
> > From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> > St phane Aulery
> > Sent: Friday, 30 September 2016 6:19 AM
> > To: ETH Oberon and related systems
> > Subject: Re: [Oberon] Oberon for a C++ user.
> >
> 
> I'd like to see actual example code that illustrates the problem as I
> am not convinced it is a problem - at least not with the latest
> version of Oberon.




More information about the Oberon mailing list