File:  [gforth] / gforth / mini-oof.fs
Revision 1.6: download - view: text, annotated - select for diffs
Sun Feb 28 22:58:26 1999 UTC (25 years, 1 month ago) by pazsan
Branches: MAIN
CVS tags: HEAD
I removed the glossary from mini-oof, please keep it out!
moofglos.fs keeps the glossary

    1: \ Mini-OOF                                                 12apr98py
    2: : method ( m v -- m' v ) Create  over , swap cell+ swap
    3:   DOES> ( ... o -- ... ) @ over @ + @ execute ;
    4: : var ( m v size -- m v' ) Create  over , +
    5:   DOES> ( o -- addr ) @ + ;
    6: : class ( class -- class methods vars ) dup 2@ ;
    7: : end-class  ( class methods vars -- )
    8:   Create  here >r , dup , 2 cells ?DO ['] noop , 1 cells +LOOP
    9:   cell+ dup cell+ r> rot @ 2 cells /string move ;
   10: : defines ( xt class -- ) ' >body @ + ! ;
   11: : new ( class -- o )  here over @ allot swap over ! ;
   12: : :: ( class "name" -- ) ' >body @ + @ compile, ;
   13: Create object  1 cells , 2 cells ,

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