Find limit of recursion: Difference between revisions

Content added Content deleted
(COBOL)
m (→‎{{header|Ada}}: whitespace)
Line 2: Line 2:


=={{header|Ada}}==
=={{header|Ada}}==
<lang Ada>
<lang Ada>with Ada.Text_IO; use Ada.Text_IO;
with Ada.Text_IO; use Ada.Text_IO;


procedure Test_Recursion_Depth is
procedure Test_Recursion_Depth is
Line 15: Line 14:
begin
begin
Put_Line ("Recursion depth on this system is" & Integer'Image (Recursion (1)));
Put_Line ("Recursion depth on this system is" & Integer'Image (Recursion (1)));
end Test_Recursion_Depth;
end Test_Recursion_Depth;</lang>
</lang>
Note that unlike some solutions in other languages this one does not crash (though usefulness of this task is doubtful).
Note that unlike some solutions in other languages this one does not crash (though usefulness of this task is doubtful).