- Jun
- 42
- 0
Is function recursion not supported?
I seem to be able to define recursive functions, but upon execution I get a TCC: Variable loop error. Even multi-function recursion fails, ie, A > B > A > B ...
The consummate example:
- Josh
I seem to be able to define recursive functions, but upon execution I get a TCC: Variable loop error. Even multi-function recursion fails, ie, A > B > A > B ...
The consummate example:
Code:
C:\>function factorial=`%@if[%1 gt 1,%@eval[%1 * %@factorial[%@dec[%1]]],1]`
C:\>echo %@factorial[5]
TCC: Variable loop
- Josh