Find limit of recursion is part of Short Circuit's Console Program Basics selection.
Task

Find the limit of recursion.




atom t1 = time()+1
 
integer depth = 0
 
procedure recurse()
    if time()>t1 then
        ?depth
        t1 = time()+1
    end if
    depth += 1
    -- only 1 of these will ever get called, of course...
    recurse()
    recurse()
    recurse()
end procedure
 
recurse()
