![]() | ||
| Home | SwiftX Archive | SwiftForth Archive | |

How can you write states in forth without forward references ?
VARIABLE 'MyState
: State1 ( event -- )
somecode1
IF
['] State2 'MyState !
THEN ;
: State2 ( event -- )
somecode2
IF
['] State3 'MyState !
THEN ;
: State3 ( event -- )
somecode3
IF
['] State1 'MyState !
THEN ;
: Main ( -- )
['] State1 'MyState !
BEGIN
KEY 'MyState @EXECUTE
AGAIN ;
Nestor Closa
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Tue Mar 26 2002 - 12:46:51 PST
This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:23 PST