Re: Display array
Posted in 1996
Eugeny Drokov <dei@karakan.nstu.nsk.su> wrote: :Hi, :Nils Myklebust <Nils.Myklebust@idg.no> wrote: :: Simply use :: display pgm_arr[p_count].* :: to scr_arr[p_count].* :: inside a loop that increments p_count. :: Start the counter at 1 and make sure you don't display beyond the :: number of elements in the scr_arr screen array. :: You can put all kinds of attributes on this display statement to make :: your list look nice. :: rrela@dc.uba.ar (Ramiro Rela) wrote: :: :I need to display an array to an opened form and inmediatelly :: :(without asking the user to press any key) continue the program :: :execution. :: :I tried, :: : DISPLAY ARRAY pgm_arr TO scr_arr.* :: : EXIT DISPLAY :: : END DISPLAY :: : ... :: :but this sintaxis is not allowed. Any statement must be below an 'ON KEY :: :key' clause. : I think, there is the much better solution: : INPUT ARRAY pgm_arr WITHOUT DEFAULTS FROM scr_arr.* : BEFORE INPUT : EXIT INPUT : END INPUT :-- :Eugeny Drokov dei@interface.nsk.su :Informix Tech. Manager http://spark.nstu.nsk.su/~dei :INTERFACE Computer Centre http://spark.nstu.nsk.su :Russia, Novosibirsk, Karl Marx ave. building 2, r.520 Great. I hadn't ever thought of this. My solution is from before the "before input" existed at all, and just used ever since. However there are situations where I will still use the display approach. Often it will take an unknown amount of time to read the data to be displayed from the database. In these cases it is very nice to the user to display the data as it is read so they can start looking at it. Otherwise the input array solution is greate. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org