当我尝试在下面的 if 条件中使用该过程时,它不起作用。
proc "isAvailable"{
bool false
}
loop[val index [int 0]]{
if[isAvailable]{
show-alert "Test"
} else {
show-alert[ $index |str]
}
if [$index | lt 200 ]{
recur [$index | plus 50]
}
}
错误消息是Cannot match given parameters to declared parameters at if
,但我不明白这个消息。是否需要参数作为过程的输入?