|
Right on Jon..... -----Original Message----- From: Jon.Paris@halinfo.it <Jon.Paris@halinfo.it> To: RPG400-L@midrange.com <RPG400-L@midrange.com> Date: Sunday, April 02, 2000 6:10 PM Subject: Re: Questions > > >The result in Res (if it were defined as 2A which is the smallest it should be) >will be '11'. Why - well ..... > >c MOVEA *ON *IN >First the MOVEA will place '1' in every position in the *IN array - in other >words every indictor from 01 to 99 will be turned on. > >C EVAL RES=(VAR1>VAR2) + *IN35 > >The expression VAR1 > VAR2 is true since VAR2 is treated as containing 'R' >followed by 49 blanks and 'RE' is higher up the collating sequence than 'R '. >That logical expression being true renders a '1' since a logical expression is >equivalent to an indicator which in RPG can be treated as a character field. >For the same reason *IN35 renders a '1' since it was turned on by the MOVEA. So >'1' + '1' = '11' !!!! > >I can only hope that this is some kind of "lets see who can write the most >stupid obscure code in the world" contest because if I ever caught anyone >programming like this I'd fire them! > > >+--- >| 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 >+--- > +--- | 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.