File:  [gforth] / gforth / compat / Attic / interactive-does.fs
Revision 1.1: download - view: text, annotated - select for diffs
Sun Jun 14 20:50:07 2009 UTC (13 years, 5 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Added an ANS version for interactive DOES>

wordlist constant oneshot-me
get-current
oneshot-me set-current
: ; postpone ; previous execute ; immediate
set-current
: >order  ( wid -- ) >r get-order r> swap 1+ set-order ;
: oneshot: :noname oneshot-me >order ;

: DOES> state @ IF
     postpone DOES>
  ELSE
    oneshot: postpone DOES>
  THEN ; immediate

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