Find limit of recursion: Difference between revisions

Content added Content deleted
m (→‎Icon and Unicon: header simplification)
Line 392: Line 392:
SetRecursionTrapInterval(0);</lang>
SetRecursionTrapInterval(0);</lang>


== Icon and Unicon ==
=={{header|Icon}} and {{header|Unicon}}==
{{works with|Unicon}}
==={{header|Icon}}===
<lang Icon>procedure main()
<lang Icon>procedure main()
envar := "MSTKSIZE"
envar := "MSTKSIZE"
Line 407: Line 407:
end</lang>
end</lang>
Note: The stack size environment variable defaults to about 50000 words. This terminates after approximately 3500 recursions (Windows). The interpreter should terminate with a 301 error, but currently this does not work.
Note: The stack size environment variable defaults to about 50000 words. This terminates after approximately 3500 recursions (Windows). The interpreter should terminate with a 301 error, but currently this does not work.

==={{header|Unicon}}===
This Icon solution works in Unicon.


=={{header|Inform 7}}==
=={{header|Inform 7}}==