|
It is "working as designed" - if you look at your compile listing you'll find two RNF7551 messages - telling you that your accuracy has dropped to 1 and then 0 decimal positions. When you add a 15,2 field to a 15,2 field the compiler has to assume "worst case" and that the temp result will require a 16,2 field. Add the next calculation and the temp becomes 17,2 then 18,2 'til it eventually exceeds 30 and starts dropping decimal places. To prove this to your self drop the last two factors from the Eval and you'll see. We humans can see that the temp doesn't need to be that big, but the poor old compiler has to assume worst case. +--- | 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.