|
I do this, for better or for worse: Dindptr s * inz(%addr(*in)) Dindicators ds 99 based(indptr) D Prompt 4 4 D Refresh 5 5 . . . D errInd 30 39 D errDate 30 30 D errAcct 31 31 . . . . I then initialize the errind subfield when necessary: C eval errInd = *all('0') Phil -----Original Message----- From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On Behalf Of Jim Langston Sent: Monday, June 18, 2001 1:21 PM To: RPG400-L@midrange.com Subject: Re: MOVEA -> EVAL Oh, please no! I had to maintain that type of code way back when in QuickBasic. I don't know why, but that code just doesn't feel "right" to me. I think because I've come across so many compilers that don't follow the right to left rule. Some do left to right, in which case you would get different results. I have always thought, though, that there should be some method of setting/clearing/initialing more than one variable at a time in languages, but I don't think that's the answer. Maybe something like: C Eval Inz(*Off, *IN01, *IN02, *IN03, *IN04, *IN05) would be nice, and would be very understandable and self explanatory. But, the closest I've ever seen is the QuickBasic's method that you show here. Regards, Jim Langston Me transmitte sursum, Caledoni! James David Rich wrote: > > On Fri, 15 Jun 2001, Alan Addison wrote: > > > them. Some subfiles programs of mine have had to use up to 4 indicators > > per field (RI, PC, PR, ND) and twenty or more Eval *INxx = *OFF takes a lot > > of space. > > How about: > > eval *inaa = *inbb = *incc = *indd = *inee = ... = *off > > Or maybe this can't be done in RPG? > > James Rich > james@eaerich.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.