You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ chaos dev.kaos
...
f2
f1
f2
f1
f2
f1
f2
Chaos Error:
Module: dev.kaos
Line: 7
Maximum recursion depth 1000 exceeded!
1000 maximum recursion depth limit added to prevent stack overflow. A functional language should be tail recursion optimized. So there should be no such limit. The recursive function calls should be done with goto or longjmp instead of direct C function calls.
Here is another example to demonstrate the maximum recursion depth limit:
Right now the below Chaos program ends with a
Maximum recursion depth 1000 exceeded!
error:$ chaos dev.kaos ... f2 f1 f2 f1 f2 f1 f2 Chaos Error: Module: dev.kaos Line: 7 Maximum recursion depth 1000 exceeded!
1000
maximum recursion depth limit added to prevent stack overflow. A functional language should be tail recursion optimized. So there should be no such limit. The recursive function calls should be done withgoto
orlongjmp
instead of direct C function calls.Here is another example to demonstrate the maximum recursion depth limit:
$ chaos dev.kaos ... 995 996 997 998 999 1000 1001 Chaos Error: Module: dev.kaos Line: 3 Maximum recursion depth 1000 exceeded!
The text was updated successfully, but these errors were encountered: