Hello,
Quite a few of my programs use a "state machine" design whereby I use a bunch
of Factor variables to represent the state. When using these programs
interactively, staying aware of the state helps to know what's going on. I
implemented an enhanced stack display which let's you selectively monitor
variables.
Define some symbols
( scratchpad ) SYMBOLS: a b c ;
----------
----------
Watch their values
( scratchpad ) { a b c } watch-vars
----------
a: f
b: f
c: f
----------
----------
Change the values of the variables
( scratchpad ) 10 a set
----------
a: 10
b: f
c: f
----------
----------
( scratchpad ) 20 b set
----------
a: 10
b: 20
c: f
----------
----------
( scratchpad ) 30 c set
----------
a: 10
b: 20
c: 30
----------
----------
Stop monitoring a particular variable
( scratchpad ) b unwatch-var
----------
a: 10
c: 30
----------
----------
If you'd like to use this feature, do this in your listener:
USE: display-stack
display-stack
Ed
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk