Re: Does 4GL support dynamic arrays?
Posted in 1992
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
eb@felix.Sublink.Org (Enrico Badella) writes: >I hope I can correctly explain my problem! >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. >This would avoid defining a very big array wasting lots of space >most of the time or the opposite that I define a m sized array >and my select extracts m+1 records. Of course 4GL doesn't support dynamical array (it's a 4th-Generation-grmblafdj), but it has another built-in dynamical "data-structure". Try using: 'create temp table (...)' and `insert into temp table ...' This would be a litte slower than arrays but it's the only way I know :-( >-- >Enrico Badella Internet: eb@felix.sublink.org >Soft*Star s.r.l. eb@icnucevx.cnuce.cnr.it >Via Camburzano 9 Phone: +39-11-746092 >10143 Torino, ITALY Fax: +39-11-746487 -- -= Gero Verch =- (gfv@daddel.saar.de)