【问题标题】:How do I import modules in the Factor interpreter?如何在 Factor 解释器中导入模块?
【发布时间】:2011-08-18 00:06:44
【问题描述】:

我正在关注 Sam 的 decipher tutorial。当他在我的电脑上执行8 group 时,Factor 抱怨说它不知道group 功能。

( scratchpad ) "01101001001000000110011001110101011000110110101101100101011001000010000001111001011011110111010101110010001000000110110101101111011011010000110100001010011000010110111001100100001000000110111001101111011101110010000001100110011011110111001000100000011110010110111101110101"

--- Data stack:
"0110100100100000011001100111010101100011011010110110010101100..."
( scratchpad ) 8 group
1: 8 group
          ^
No word named “group” found in current vocabulary search path

The following restarts are available:

:1      Use the grouping vocabulary
:2      Use the unix.ffi vocabulary
:3      Use the unix.groups vocabulary
4 :res  Defer word in current vocabulary

Type :help for debugging help.

显然group 位于grouping module 中,但我不知道如何在解释器中导入模块(类似于Haskell 的GHCi 中的+m module)。

【问题讨论】:

    标签: import module interpreter factor-lang


    【解决方案1】:

    在解释器中,输入 USE: grouping ; 以将单个词汇表添加到搜索路径,或输入 USING: a b c ; 以添加词汇表列表。

    文档:USE:USING:

    【讨论】:

      猜你喜欢
      • 2017-03-05
      • 2013-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-28
      • 2018-11-26
      • 1970-01-01
      相关资源
      最近更新 更多