Maybe I am showing my novice thinking, but would it make sense to pass
the first number not by value, but with CONST ?

Then the number could be defined 15P5 (which the box loves) and the
CONST would handle any conversion work if you passed in 15P0.

You could also add an optional parm for how many decimals should be in
the final result returned.
The default would be zero dec, but 2 dec would be a parm used often for
dollar amounts.

Anyone got a better and/or cleaner scheme to do this,
as far as handling 1,2,3 or 4 decimal places?
(1 function to handle all decimal place variations)


//--------------------------------------------------------------------
// Trim & Edit a number at the same time, 0 decimal places.

//--------------------------------------------------------------------
d tred...
d pr 20 varying
d pNbr 15p 0 value
d pEditCode 1 const options(*nopass)


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.