Re:It’s COBOL all the way down
by Someone on Tuesday May 01, 2018 @04:01PM
(#16970914)
Classic COBOL needs a stack (or something equivalent. A popular choice was to store return addresses of calls near function entry points, distributing the stack through memory) to support the case where a single subroutine is called from more than one place in the program (most, if not all, programs will have those, if only to do I/O)
What it doesn’t need (and didn’t support) is recursion, and without recursion, the maximum depth of the stack can be computed at compile time, so that a program can refuse to run if there isn’t sufficient room for a stack that size. (The first FORTRAN’s were similar in this respect. If you wanted your program to support larger arrays, you recompiled it)
What it doesn’t need (and didn’t support) is recursion, and without recursion, the maximum depth of the stack can be computed at compile time, so that a program can refuse to run if there isn’t sufficient room for a stack that size. (The first FORTRAN’s were similar in this respect. If you wanted your program to support larger arrays, you recompiled it)