Skip to content

Instantly share code, notes, and snippets.

@tomaes

tomaes/jump.pas

Created Apr 14, 2020
Embed
What would you like to do?
Testing the limits of recursion in Turbo Pascal 7.0 (1992)
(*
TP 7.0 recursion limit test: 3965 - stack:16384 (def)
16249 - stack:65520 (max)
*)
program rec_test;
{$M 65520, 0, 655360} (* stack, heapmin, heapmax *)
uses crt;
const R = 16249;
var i: integer;
procedure jump;
begin
inc(i);
{$IFDEF output}
writeln('Rec Nr.: ',i);
{$ENDIF}
if i < R then jump;
end;
begin
jump;
writeln(i, ' recursions done. Press Key.');
repeat until keypressed;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.