Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如我记得 FIG-Forth 中的 'tick' ,当单词不在单词列表中时,它可以在不流产的情况下使用:
' the_word
如果它在单词列表中,则给出对该单词的引用,否则给出“假”。
是否可以在 ANS Forth 中构造类似的东西以与 [if]、[then] 和 [else] 一起使用?
我猜是这样的:
: tick ( a u -- xt|f ) bl word find 0= if drop 0 then ;
FIG-Forth 文件说:
留下字典单词nnnn的参数字段地址。作为编译器指令,在冒号定义中执行以将地址编译为文字。如果在搜索 CONTEXT 和 CURRENT 后未找到该词,则会给出相应的错误消息。
虽然完全有可能你使用的FIG-Forth版本没有遵守标准,返回false。