Re: get_fldbuf()
Posted in 1998
Topics: General Discussion
In article <705vlq$8a1$1@news.xmission.com>, mdstock@informix.com wrote: > > > > Hi, > > > > We've just moved from RDS V4.0 to RDS V4.2 but I didn't get any > > manuals or supplements that discuss the differences between the > > versions. > > However, I do have a copy of V4.10 supplement and I was reading about > > the get_fldbuf() function and wondered if anyone could clarify for me > > why this function was introduced. > > I am guessing that if > > Are you using a cell phone? You seem to have been cut off. :-) > > The get_fldbuf function, AFAICR, was introduced with the CONSTRUCT > clauses. It enables you to actually 'see' the contents of a field, > particularly in an AFTER FIELD clause. > It also works during INPUT statements. If you have any ON KEY statements that have NEXT FIELD or EXIT INPUT statements, the contents of the last field variable may not be what appears on screen (e.g. the user types over last name SMITH with JOHNSON, then types F3 which is supposed to do something with the last name: ON KEY ( F3 ) CALL doSomething( recInput.lastName ) Since the cursor never left the lastName field, the contents of the variable would still be SMITH. However: ON KEY ( F3 ) LET recInput.lastName = get_fldbuf( scrRecord.lastName )# screen record ref # or LET recInput.lastName = get_fldbuf( last_name ) # table reference # or, most exhaustively CALL get_fldbuf( scrRecord.* ) RETURNING recInput.* CALL doSomething( recInput.lastName ) would do send value JOHNSON instead. Mark's original reply concerning CONSTRUCT is correct, and it works for INPUT ARRAY as well. -- Dennis J Pimple Informix Software, Inc. Denver, CO, USA -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own