Diff for /gforth/objexamp.fs between versions 1.1 and 1.4

version 1.1, 1998/08/03 17:56:05 version 1.4, 1998/12/08 22:02:49
Line 1 Line 1
 \ examples and tests for objects.fs  \ examples and tests for objects.fs
   
 \ written by Anton Ertl 1996, 1997  \ written by Anton Ertl 1996-1998
 \ public domain  \ public domain
   
 cr object heap-new print  cr object heap-new print
Line 82  m: ( object -- n ) Line 82  m: ( object -- n )
   
 end-class xcounter  end-class xcounter
   
   
 object class  object class
     foobar implementation      foobar implementation
   
Line 139  int drop-order Line 140  int drop-order
 order  order
 cr  cr
   
   \ test override of inherited interface selector
   xcounter class
   
   m: ( object -- n )
       this [parent] val 2*
   ;m overrides val
   
   end-class ycounter
   
   ycounter dict-new constant z
   cr
   z print cr
   z val . cr
   z inc
   z val . cr
   1 z add
   z val . cr
   
   \ test inst-value
 object class  object class
     foobar implementation      foobar implementation
   

Removed from v.1.1  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>