Rebol中虚拟运行环境的自动修改功能
我想在函数执行完毕后自动修改它(上下文是在虚拟运行时环境中远程执行,该环境共享模拟函数堆栈的代码块(因为这个堆栈是共享的,我想每次为下一个命令重置所有内容)调用)请参阅 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 参数类型: 亮词
如何解决这个问题?
I want to auto-modify a function once it has executed itself (context is remote execution in a virtual runtime environment that shares a code-block which simulate stack of functions (because this stack is shared I want to reset everything each time for next command call) see http://askblogautomation.com/developers-guide/) like this for example ( for full context see http://askblogautomation.com/install-wordpress/):
install-wordpress
set 'install-wordpress func[][do read http://askblogautomation.com/install-wordpress/]
I want to genericize the above lines with
execute 'install-wordpress
Where execute is as below
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
]
But when I tried it, it gives error:
** Script Error: execute expected lit-word-command argument of type:
lit-word
How to fix this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要么更改调用行:
要么更改函数规范:
但不能两者都更改!
Either change the invoking line:
Or change the function spec:
But not both!