我有一个单词构造了一个我想要被引用的引文.但是,当我加载代码时,我得到的不能将"call"应用于运行时计算值.如果我使用walker并逐步执行它按预期执行的代码.你怎么称呼建造的报价?
: ba>struct ( array class -- struct array )
[ <struct> swap ] keep struct-slots
[
[ type>> to-type ] keep
name>> setter-word 1quotation curry
[ over ] dip curry call drop
] each
;
Run Code Online (Sandbox Code Playgroud)
编辑:这确实有效
: ba>struct ( array class -- struct array )
[ <struct> swap ] keep struct-slots
[
[ type>> to-type ] keep
name>> setter-word 1quotation curry
[ over ] dip curry call( -- x ) drop
] each
;
Run Code Online (Sandbox Code Playgroud)
问题源于运行时不知道构造引用的堆栈效应是什么.在这些情况下,您必须声明堆栈与调用的引用相似.