--- gforth/mini-oof.fs 1998/10/10 10:28:34 1.4 +++ gforth/mini-oof.fs 1999/02/28 22:58:26 1.6 @@ -1,3 +1,4 @@ +\ Mini-OOF 12apr98py : method ( m v -- m' v ) Create over , swap cell+ swap DOES> ( ... o -- ... ) @ over @ + @ execute ; : var ( m v size -- m v' ) Create over , + @@ -6,7 +7,7 @@ : end-class ( class methods vars -- ) Create here >r , dup , 2 cells ?DO ['] noop , 1 cells +LOOP cell+ dup cell+ r> rot @ 2 cells /string move ; -: defines ( xt class "name" -- ) ' >body @ + ! ; +: defines ( xt class -- ) ' >body @ + ! ; : new ( class -- o ) here over @ allot swap over ! ; : :: ( class "name" -- ) ' >body @ + @ compile, ; Create object 1 cells , 2 cells ,