4 ms·
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
by Someone 9y ago
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)