|
Ah.... Someone must have changed the compiler defaults to TRUNCNBR(*NO). I remember being very frustrated with this issue for a while. I'm still leaning toward trying to make this a shop standard. I've also been bit by the (cant remember the name) data area that applies compiler defaults. As I recall, this was a work-around that IBM provided early in V4, which was replaced by new control spec options in later releases..... Applying the control spec options fixes these problems nicely. Eric DeLong Sally Beauty Company MIS-Sr. Programmer/Analyst 940-898-7863 or ext. 1863 -----Original Message----- From: Jon Paris [mailto:Jon.Paris@Partner400.com] Sent: Wednesday, March 06, 2002 10:58 AM To: rpg400-l@midrange.com Subject: Activation groups for beginners >> Numeric truncation - Like it or not, some programmers have come to depend on the old truncation rules. ...... For maximum compatibility, use control spec TRUNCNBR(*YES) to restore the old rules for the initial conversion. "Restore" is not the right word here. TRUNCNBR(*YES) is the default behavior for RPG IV and always has been. It is only on EVAL that you get an error - ADD, MULT etc. behave the way they always have. The *NO option was introduced (V4R2?) for those who preferred truncation to cause an error the way that EVAL does. The other thing I might add to your list is that most people find *RESDECPOS to be a useful default option when first using expressions because it uses what (in my opinion) are more sensible rules when deciding the size of intermediate results. Jon Paris Partner400 _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.