|
Doug, You can disagree all you want as to whether it's "best practices". I'm defining "best practices" by usage. I've been around a little, in a few shops, and would guess that this technique is so widespread it would be a mini-Y2K to eliminate all usage of it. Furthermore, if you don't want any wars about how lousy RPG is now that it's just a clone of C, then don't start one. jt | -----Original Message----- | From: rpg400-l-bounces@xxxxxxxxxxxx | [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Douglas Handy | Sent: Tuesday, February 17, 2004 3:40 PM | To: RPG programming on the AS400 / iSeries | Subject: Re: Strange result with exponents... | | | JT, | | >| C MyMDY MULT 10000.01 MyYMD | | >This particular technique has been "best practices" | | I heartily disagree. It was never a good practice. It was both | non-intuitive | and a bad performer, because it caused exception processing overhead. | | >But I still shake my head at the thread on how | >to use /Free to add 1 to a counter. | | As of V5R2, use: | | counter++ | | Prior to that, use: | | counter = counter + 1 | | And please, no wars on the use of ++ being complicated or causing | C programmers | trouble. The only trouble there is when they use it within | complex expressions | and don't consider the timing of when it occurs within the scope | of the entire | statement. Used by itself there is no issue with people | expecting it occur at a | different time than it does. | | Doug | _______________________________________________ | This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list | To post a message email: RPG400-L@xxxxxxxxxxxx | To subscribe, unsubscribe, or change list options, | visit: http://lists.midrange.com/mailman/listinfo/rpg400-l | or email: RPG400-L-request@xxxxxxxxxxxx | 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.