Re: Variable array definition.
Posted in 1991
>> In 4gl You can define an array of records with static bounds: >> X ARRAY [40] OF RECORD LIKE .... >> What, when You a priori don't know how large this array must be? >> ... >> >> Does anyone knows a chic solution? >> >> Thanks Dieter Becker > >Dieter, > >I needed a feature just like this the other day. Try as I might, >I couldn't get it to work until the obvious occurred to me: >This is why we can create temporary tables! > >IN your 4GL code create the temporary table with the structure of the >desired array. Select the data into it. Retrieve what you need. Drop it >when you are done. > >Best Regards > >---------------------------------------------------------------------------- >Jeff Cauhape cauhape@TWG.COM 415/962-7147 Room 224 (SneakerNet) > Unfortunately the temporary table will not work with the display array functions. (If you can get it to work, _p_l_e_a_s_e_ let me know how. Many of our applications use a query to fill an array which will be displayed for user selection. If I set the array size too small or too large, well you can figure out the implications. I agree with Dieter, this type of functionality is needed and all possible solutions would be appreciated. ======================================================================== Harold L. Trammel | hlt@napcc.cvm.uiuc.edu National Animal Poison Control Center | (128.174.187.6) College of Veterinary Medicine | University of Illinois Urbana-Champaign | Urbana, IL | ========================================================================