|
On Wed, 2009-03-25 at 14:27 -0500, Kurt Anderson wrote:
Using that example, you could, if you wanted, use *zeros instead of a line of 0's:
coldta = %subst( *zeros: 1: cwdth( #col ) - %len( coldta ) ) + coldta;
Um, not at V5R2, where the attempt tells me RNF0361 "The first parameter
*ZEROS for %SUBST is not valid; built-in function is ignored."
I typed 15 zeros because I rarely see numeric fields larger than that.
(Well, my preference for *CMD definitions largely protects me from even
those, but that is a fetish for me to flog some other day <grin />.)
Still, I am not entirely comfortable stopping there. How can the
compiler, not even knowing that coldta represents a number, do any
better?
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.