我想在一个函数执行后自动修改一个函数(上下文是在虚拟运行时环境中远程执行,它共享一个模拟函数堆栈的代码块(因为这个堆栈是共享的,我想每次重置所有内容)对于下一个命令调用)请参见http://askblogautomation.com/developers-guide/)这样的例子(对于完整的上下文,请参阅http://askblogautomation.com/install-wordpress/):
install-wordpress
set 'install-wordpress func[][do read http://askblogautomation.com/install-wordpress/]
我想用
对上面的行进行泛化execute 'install-wordpress
执行如下
execute: func[lit-word-command [lit-word!]][
do get lit-word-command
block-command: []
append block-command [do read]
append block-command to-url rejoin [http://askblogautomation.com/ lit-word-command]
set lit-word-command func[] block-command
]
但是当我尝试它时,它会出错:
**脚本错误:执行类型的预期lit-word-command参数: LIT-字
如何解决这个问题?
答案 0 :(得分:2)
更改调用行:
execute to-lit-word 'install-wordpress
或更改功能规格:
execute: func[lit-word-command [word!]][
但不是两个!