Pito,

> Hi,
> just as an inspiration - for people who use amforth with student for
> education - in the FlashForth there is a nice worh "help" I like
> (see ff36). You load the help and helpwords (~few kB) and:
> help emit

see repository: lib/help.frt and lib/help-words.frt.
the later will be automatically generated (later on)

\ small online help system

\ usage
\  help <word>
\ prints the stack effects and a short description 

\ requires words from dict_wl.inc

wordlist constant help-wl

: help
    bl word count
    help-wl search-wordlist
    if execute then
;


m...@ayla:~/projekte/Sourceforge/amforth/trunk/lib$ cat help-words.frt 

\ requires help
\ 

get-current
help-wl set-current

: emit 
  ." ( c -- ) "
  ." R:( -- ) "
  ." emits a single character on the terminal, calls pause" ;
  
: key 
  ." ( -- c ) "
  ." R: ( -- ) "
  ." waits for a key stroke, calls pause "
;


set-current


it uses a separate wordlist and if it finds a word there, it will
be executed. Not to be confused with the standard wordlists. One
should never add help-wl to the search-order ;=)

Again: great idea

Matthias



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Amforth-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to