Re: array ?
Posted in 1994
Dennis Pimple (dennisp@informix.com) wrote: : doug@catseye.snide.com (Douglas R. Probst) writes: : >Now for the problem; how do I get reverse video on and off as I enter and : >exit each field of the array?? : For each *Field* of the array, rather than each *row* of the array: : DEFINE arr SMALLINT : DEFINE scr SMALLINT : ... : INPUT ARRAY array ... FROM screenrecord.* : BEFORE ROW : LET arr = arr_curr() : LET scr = scr_line() : BEFORE FIELD a : DISPLAY array[arr].a TO screenrecord[scr].a ATTRIBUTE(REVERSE) : AFTER FIELD a : DISPLAY array[arr].a TO screenrecord[scr].a : # repeat for each field : ... : END INPUT : For each *row* in the array, there is a bit of trickiness, so if that's : that you really wanted, repost and I'll provide the long-winded : solution. Why not just write BEFORE ROW LET arr = arr_curr() LET scr = scr_line() DISPLAY array[arr].* TO screenrecord[scr].* ATTRIBUTE(REVERSE) AFTER ROW DISPLAY array[arr].* TO screenrecord[scr].* ATTRIBUTE(NORMAL) This works for me. You might want to add some logic so that no empty rows are displayed reverse if you go beyond the last row. I have always been angry that this doesn't work with DISPLAY ARRAY. I am sure that it would be easy to implement BEFORE ROW/AFTER ROW etc. in DISPLAY ARRAY just as in INPUT ARRAY, and this has been near the top of the wish list for 4GL for a long time. Why has it not been implemented? Regards, Richard -- +----------------------------+-------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3421 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | | +----------------------------+-------------------------------------------+