【发布时间】:2015-02-19 18:16:20
【问题描述】:
min-one-of 报告了一个我不明白的错误。我了解min-one-of 需要报告程序。我有这个,下面标注为reporter-procedure。
但是,我的报告程序将另一个程序的输出作为其输入。我的意图是other-procedure 的输出将作为输入输入reporter-procedure。
Netlogo 告诉我,下面代码部分中的另一个程序other-procedure 应该是一个记者。为什么?
请注意,other-procedure 接受四个变量作为输入。
let best-taxi min-one-of available-taxis [reporter-procedure ( other-procedure var1 var2 var3 var4) ]
现在如果我不带括号尝试这个,错误消息是 reporter-procedure 预期 1 输入:
let best-taxi min-one-of available-taxis [reporter-procedure other-procedure var1 var2 var3 var4]
所以我猜reporter-procedure 先执行。如果是这样,为什么第一组代码(带括号的代码)不能让other-procedure先执行?
【问题讨论】: