Search code examples
forthgforth

What has happened to 'tick' in ANS Forth?


As I remembered 'tick' from FIG-Forth, it could be used without abortion when a word wasn't in the wordlist:

' the_word 

gave a reference to the word if it was in the word-list and gave 'false' otherwise.

Is it possible to construct something like that in ANS Forth to be used with [if], [then] and [else]?


Solution

  • I guess something like this:

    : tick ( a u -- xt|f ) bl word find 0= if drop 0 then ;