16.6.1.2192 SEARCH-WORDLIST SEARCH
( c-addr u wid -- 0 | xt 1 | xt -1 )
Find the definition identified by the string c-addr u in the word list identified by wid. If the definition is not found, return zero. If the definition is found, return its execution token xt and one (1) if the definition is immediate, minus-one (-1) otherwise.
See:
Rationale:
When SEARCH-WORDLIST fails to find the word, it does
not return the string, unlike FIND. This is in
accordance with the general principle that Forth words consume
their arguments.
Testing:
ContributeContributions
lmr [318] NDCS xtRequest for clarification2023-12-17 18:15:48
When searching for a word with NDCS, what XT should be returned? An xt dependent on STATE at the time of the call as in the spec for FIND, a state-smart xt...? I'm surprised no one asked while FIND has lots of comments