3 ms·
> Due to COBOL's lack of functions and recursion Wait, what? Someone forgot about the PERFORM verb. Or, are they writing this in an old enough version of COBOL
by flyinghamster 8y ago
> Due to COBOL's lack of functions and recursion
Wait, what? Someone forgot about the PERFORM verb. Or, are they writing this in an old enough version of COBOL for that not to be present?
- rst 8y agoPERFORM was in the original 1960 COBOL spec -- but attempting to use it recursively was (and may remain) undefined behavior.
- zerr 8y agoCan't the recursion be implemented explicitly with Stack data structure? (if it's possible to have/implement the stack in COBOL, not sure).
- abrax3141 8y agoCOBOL, and other PLs of that day, were heavily integrated with the ISAM file structure. ISAM a precursor of SQL, and was basically a hash table implemented very efficiently in a file. If you have hash tables, you can do pretty much anything. (Actually, it was better than a hash table. Once you had indexed (I) into the file, you could sequentially read forward (S). The AM is Access Method.)
- flyinghamster 8y agoAh, that makes sense, then. The last time I wrote anything in COBOL was in a class about 35 years ago. ;)
- drbw 8y agoYeah, but there's no local variables or dynamic memory allocation (from what I remember of COBOL85 on Tandems, anyway)