|
>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? Do you have any idea how many manuals there are? How many manuals I have already read for other things? If the mind set of IBM and the RPG developers is, we are going to do things the way we want to do them, if you want to know how we decided to do them then you're going to have to RTFM, RPG is truly going to die. I do not have time to read the 170 manuals on the AS/400 that I can find. Who has read every single one of the manuals? And although people should read the manuals, common sense needs to be an important part of the equation too. Regards, Jim Langston Dan Bale wrote: > Jim, > > I must respectfully protest your response. RTFM is a mantra on this list and >on > the MIDRANGE-L. If you refuse to educate yourself on the intricacies of >numeric > expressions using EVAL, as Hans suggested, then you need to revert back to >your > ADD, DIV, SUB, & MULT opcodes. The opening paragraphs of chapter 21 make it > very clear: +--- | 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-2025 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.