该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


The Recurse() function makes a recursive call of the defining function. For example, you can make a function to calculate factorials. A factorial is the product of a number, the number minus 1, the number minus 2, and so on, down to 1.
myfactorial = Function( {a},
If( a == 1,
1,
a * Recurse( a - 1 )
You can define recursive calculations without using Recurse(). For example, you could replace Recurse() by myfactorial, and the script would still work. However, Recurse() offers these advantages: