|
Unless there's some measured performance issue (as opposed to a
theoretical one), I'm getting mroe conservative in my old age and
thinking the simplest answer is the best:
// Convert 8.0 decimal to 6.0 decimal
decimal6 = %dec(%subst(%editc(decimal8:'X'):3:6):6:0);
No extra code, no extra variables, no basing pointers, and everything
clearly on one line.
Joe
I'm sorry if I'm really, really misunderstanding. But my first
thought when you said you wanted to replace a MOVE from 8 to 6, was
simply
my6 = %rem(my8:1000000)
And when someone mentioned an "arithmetic solution" that is what I
thought he meant.
Am I missing something?
John
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.