【发布时间】:2011-10-26 04:21:39
【问题描述】:
我今天刚开始使用applescript,听说了子程序。所以我决定编写一个小测试程序,它接受一个数字,将其加 9,减 27,除以 3,然后返回结果。只有它不返回结果;它会返回 StackOverFlow 错误。什么是 StackOverFlow 错误?
程序编译正确,不知道哪里出错了。就像我说的,我非常是 applescript 的新手。这是我正在运行的代码:
calculate_result(text returned of (display dialog "Enter a number:" default answer ""))
on calculate_result(this_result)
set this_result to this_result + 9
set this_result to this_result - 27
set this_result to this_result / 3
return calculate_result(this_result)
end calculate_result
【问题讨论】:
标签: applescript stack-overflow subroutine