[Oberon] FPGA - Simple OOP example
    Tomas Kral 
    thomas.kral at email.cz
       
    Thu Aug 16 13:52:20 CEST 2018
    
    
  
On Thu, 16 Aug 2018 06:17:06 +0200
Jörg <joerg.straube at iaeth.ch> wrote:
> (*3*) BEGIN Texts.OpenWriter(W); NEW(super); Term.InitMethods(super);
> NEW(self); self^:= super^; self.Write := Write
Just thinking of leaving out one NEW(), i.e.
  NEW(self); Clone(self); Get(super); self.Write := Write
  PROCEDURE Clone(VAR m: Methods); BEGIN m^ = methods^ END ;
  PROCEDURE Get(VAR m: Methods); BEGIN m = methods END ;
Not sure if better, also if Clone() and Get() carry the meaning well. 
-- 
Tomas Kral <thomas.kral at email.cz>
    
    
More information about the Oberon
mailing list