I agree with everything John says, but
I do prefer the DS because I think it
documents the intention better . . .
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Monday, December 09, 2013 10:24 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Alternatives to MOVEL - just curious
What I always do for these is %DIV:
num4 = %div(num6:100);
(Or %rem for the cases where you want a MOVE.)
To me, this is simpler than a data structure because it saves lines of D-specs. However, I don't think anything will perform faster than a data structure, because that requires essentially no (execution) overhead at all, not even a move. In most cases, %DIV is plenty fast enough.
John
--
This is the RPG programming on the IBM i (AS/400 and 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.