Re: Does 4GL support dynamic arrays?
Posted in 1992
Quoting Enrico Badella... > I would like to define in 4GL an array of records dynamically, just as > if I was doing a malloc(sizeof(record) * NumRecords) because > I don't know 'a priori' the number of lines my select will retrieve. > 4GL won't support that, however there are workarounds. > What I want to do would be quite easy with ESQL/C because I > can realloc() my array; unfortunately the application goes to > a damn stupid customer that said 'NO C or ESQL/C in my applications'. > What a poor choice on the customer's part. I have overcome this problem that you're having in my db4glgen. Of course I used C functions to do this, but these four functions are simply two or three line calls to malloc. I think your customer is worried about maintaining C functions that may be complex. My four C functions do one thing and one thing only, the allocate memory dynamically for the 4GL program. They were written two years ago and have not been touched since then. These functions are maintenance free. Anyway, good luck on your quest! DAS -- David A. Snyder @ Snide Inc. - Folcroft, PA Current Release is db4glgen-3.7 UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com