display-stack: some improvements

db4
Eduardo Cavazos 2008-07-17 18:29:58 -05:00
parent 897066f8a5
commit d83fcea993
1 changed files with 5 additions and 3 deletions

View File

@ -10,10 +10,12 @@ SYMBOL: watched-variables
: watch-var ( sym -- ) watched-variables get push ; : watch-var ( sym -- ) watched-variables get push ;
: watch-vars ( sym -- ) watched-variables get [ push ] curry each ; : watch-vars ( seq -- ) watched-variables get [ push ] curry each ;
: unwatch-var ( sym -- ) watched-variables get delete ; : unwatch-var ( sym -- ) watched-variables get delete ;
: unwatch-vars ( seq -- ) watched-variables get [ delete ] curry each ;
: print-watched-variables ( -- ) : print-watched-variables ( -- )
watched-variables get length 0 > watched-variables get length 0 >
[ [
@ -33,9 +35,9 @@ SYMBOL: watched-variables
[ [
print-watched-variables print-watched-variables
"----------" print "----------" print
.s datastack [ . ] each
"----------" print "----------" print
retainstack reverse stack. retainstack reverse [ . ] each
] ]
listener-hook set ; listener-hook set ;