|
>> that under MicroFocus COBOL for the PC that I did prove that the system did physically expand the array when I defined it as varying between x and y. In some older versions of COBOL (mostly PC) this probably did happen - as you note -t hey were concerned about memory footprint. I think MF may have changed it later for reasons of compatibility with mainframe COBOL. >> In the regression and recursion routines I've done it sure 'acts' like it does truly expand, but that could be just as you said - it's pretending to. If you are using the ILE COBOL support, then yes it does expand. But that's not the same thing. The reason it expands is because each invocation level creates its own set of local variables. I'm quite willing to be proven wrong - the ILE compiler may have other differences from the OPM one, but for a variety of reasons I doubt this is one of them. If you think about it, if you do not pre-allocate the full array size, then it may have to "move" around in memory since a contiguous extension block may not be available. That would invalidate any pointers to the array itself or any elements with no way of detecting it had happened. I suspect the COBOL compiler writers would have wanted to avoid that. Jon Paris Partner400 www.Partner400.com www.RPGWorld.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.