retroforth/example/colored-dwords.retro
crc 7780f9a3dd add new example w/colored d:words; describe added to library/
FossilOrigin-Name: f921df78f23ff7a699fd63595601a340e1b618af5f06d69548aef40e10ed507d
2023-12-11 23:39:47 +00:00

19 lines
408 B
Forth

This show use of the termina color words to display the contents
of the dictionary, using colors for various word classes.
~~~
'termina library:load
:d:words/c
[ dup d:class fetch
[ &class:data [ fg:magenta ] case
&class:macro [ fg:red ] case
&class:primitive [ fg:yellow ] case
drop fg:green
] call d:name s:put sp vt:reset ] d:for-each ;
~~~
```
d:words/c
```