Find limit of recursion: Difference between revisions

Content added Content deleted
m (→‎{{header|MATLAB}}: works the same in Octave)
(new Gri)
Line 674: Line 674:
</pre>
</pre>
Hey, at least it terminated in a controlled way. I tried this task a few months ago and it crashed the whole computer. I read that the Go runtime has since been improved to handle out of memory conditions more gracefully. Seems so&mdash;my machine is still up.
Hey, at least it terminated in a controlled way. I tried this task a few months ago and it crashed the whole computer. I read that the Go runtime has since been improved to handle out of memory conditions more gracefully. Seems so&mdash;my machine is still up.

=={{header|Gri}}==
In Gri 2.12.23 the total depth of command calls is limited to an internal array size <code>cmd_being_done_LEN</code> which is 100. There's no protection or error check against exceeding this, so the following code segfaults shortly after 100,

<lang Gri>`Recurse'
{
show .depth.
.depth. = {rpn .depth. 1 +}
Recurse
}
.depth. = 1
Recurse</lang>


=={{header|Groovy}}==
=={{header|Groovy}}==