|
That is strange, because that is not the next line in my manual! The part number is SC09-1526-00 First Edition (September 1994) What version is yours? The line "... The rules for half adjusting are equivalent to those for the arithmetic operations." is the last line on page 362. Page 363 is examples such as: CL0N01Factor1++++++++Opcode(E)+Extended-factor2++++++++++++++++++++++++ C* Assume FIELD1 = 10 C* Assume FIELD2 = 9 etc... Buck Calabro wrote: > Jim, > With the greatest of respect, the very next line in the manual (V3R7) is not > some examples, it is: > "See Chapter 21, "Expressions" for general information on expressions. See > "Precision Rules for Numeric Operations" in topic 4.2.7 for information on > precision rules for numeric expressions. This is especially important if > the expression contains any divide operations, or if the EVAL uses any of > the operation extenders." > > Omitting this from your post makes it look like IBM is trying to hide > something, when in fact it is quite clear that they are pointing out a > difference between EVAL and the fixed form arithmetic operations. > > I actually agree that the arithmetic rules for EVAL should be intuitive > enough that one shouldn't need to read up on it, but I am just too darned > nosey to go using something new without reading up on it first. I just > _have_ to see how it works! <grin> > > Let me re-iterate that I haven't seen _any_ truncation messages in my > compile listings (which I faithfully check,) and I use numbers in the > hundreds of millions. I honestly think that the danger is more theoretical > than actual, but there is that manual reference to keep in mind... > > Buck Calabro > Aptis; Albany, NY > mailto:Buck.Calabro@aptissoftware.com > > > -----Original Message----- > > From: Jim Langston > > Sent: Tuesday, October 05, 1999 4:10 PM > > To: RPG400-L@midrange.com > > Subject: Re: [Re: RPGILE V4.3 Gotcha] > > > > From TFM: IBM AS/400 ILE/RPG 400 Referance > > > > EVAL (Evaluate expression) > > Code Factor 1 Factor 2 > > EVAL Blank. Assignment Statement > > > > The EVAL operation code evaluates an assignment statement of the form > > result = expression. The expression is evaluated and the result placed in > > result. > > Therefore, result cannot be a literal or constant but must be a field > > name, array > > name, array element, data structure, data structure subfield, or a string > > using the > > %SUBST builtin function. The expression may yield any of the RPG data > > types. > > The type of the expression must be the same as the type of the result. A > > character > > or graphic result will be left justified and padded with blanks or > > truncated as > > required. > > > > If the result represents an unindexed array or an array specified as > > array(*), the > > value of the expression is assigned to each element o the result, > > according to the > > rules described in the array chapter. Otherwise, the expression is > > evaluated once > > and the value is placed into each element of the array or sub-array. For > > numeric > > expressions, the half-adjust operation code extender is allowed. The > > rules for half > > > > adjusting are equivalent to those for the arithmetic operations. > > > > Then some examples follow. > > > > Oh, i guess it's the wrong FM > > > > This says no difference in computation between the EVAL format and the > > MULT > > or DIV formats. I guess we're supposed to go though and find out which > > manual > > it is in? > > > +--- > | 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.