Notifications
Clear all
[Closed] Recursive problelm
Sep 19, 2006 12:26 pm
Why this code crash my Max?
fn test value =
(
for i=1 to 10 do
(
format "%
" (value+i)
test (value+i)
)
)
test 1
As far than I can tell there is nothing wrong in that code but when I run it my max crash. Max just quit itself. No warnings or anything it just shutdown.
2 Replies
Sep 19, 2006 12:26 pm
You are causing an infinite recursion here which exhausts max call stack and thats why it quits.
Try to alter your logic of recursion such that there is always a terminating condition otherwise you will have an infinite recursion as you have here.
Hope this helps
Mobeen