Working with arrays
Posted in 1994
To: jcm@frank.nccom.com who wrote: JM> I would like to know if there is an easy way to take advantage of more > than the default(s) keyboard keys when working with screen arrays. Hmmm. There are an awful lot of questions implicit here. No offence intended, but did you RTFM? Especially regarding stuff like ON KEY, etc. The problems you describe imply that either you're new at this or I've misunderstood the question. JM> What I would like to do is have a screen full or customers come up in > an array and then allow the user to push say for example, "c" to code > them for an update to be completed. Then after they exit the screen > array, anything marked "c" would complete a patterned update (based > upon what "c" should do). You would define your program and screen arrays to have a CHAR(1) on the end, with all the other fields in the form being marked NOENTRY. You then run through a FOR loop after the user has pressed ESCAPE (check for INT_FLAG, etc.) and do your processing on an IF or CASE basis. E.g.: INPUT ARRAY p_array WITHOUT DEFAULTS FROM s_array.* FOR i = 1 TO 100 CASE WHEN p_array[i].char_field = "C" -- do this WHEN p_array[i].char_field = "X" -- do that WHEN p_array[i].char_field = "T" -- do the other --etc. OTHERWISE -- do nothing END CASE END FOR JM> Has anyone done something similar with a screen array? Or do I have to > have them do updates as such (where they just need to update one > column) in a one-by-one situation. I frequently use INPUT ARRAY for this kind of thing. It's also useful to let the users mark stuff with a well known key like TAB or suchlike if it's and either/or type situation. Hope this helps. If I did misunderstand your question, sorry, and could you try rephrasing it so this simple soul can understand it. :) Regards, billy.wheeler@digitec.co.za --- . SPEED 1.40 [NR] . Why is "abbreviated" such a long word? ---- Digitec Online - 20 Nodes * Johannesburg, South Africa +27-11-476-2008 * Best BBS * Best Sysop * @digitec.co.za * RsaNET User Choice Awards 1993 *