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

Find the limit of recursion.




procedure main() 
envar := "MSTKSIZE"
write(&errout,"Program to test recursion depth - dependant on the environment variable ",envar," = ",\getenv(envar)|&null)
deepdive()
end
 
procedure deepdive()
static d
initial d := 0 
write( d +:= 1)
deepdive()
end