【发布时间】:2014-07-08 21:07:19
【问题描述】:
我有这个简单的模块:
REBOL[
Name: 'test1
Type: 'module
Exports: [foo]
]
foo: does [print "foo"]
还有这个:
REBOL[
Name: 'test2
Type: 'module
Exports: [bar]
]
import %test1.reb
foo
bar: does [foo]
当我尝试执行import %test2.reb 时,我收到foo word is not bound to a context 错误。
在这个错误之后,我可以从控制台调用foo,所以它被导入了,但不知何故它对test2 模块是不可见的。那么在模块中使用模块的正确方法是什么?
【问题讨论】: