×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I find I'm constantly using %trim(%editc(Cust#:'3')) for
messages, logs, etc.
I got sick of having to use 2 bifs to do this.
So I made tred() and it works great for numbers with
zero decimal places.
Without tred -
msg_Send('Customer ' + %trim(%editc(sfCust#:'3'))
+ ' not found.');
With tred (optional editcode not passed) -
msg_Send('Customer ' + tred(sfCust#)
+ ' not found.');
I find I'm using this in a ton of places, but, it doesn't
handle decimal places, so --
I made another one, tred2() to do the same thing
but for 2 decimal places.
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)
Improvement suggestions?
Anyway, if not, and you find this useful, then great!
John B.
//--------------------------------------------------------------------
// 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)
//===============================================================
p tred...
p b export
d pi 20 varying
d pNbr 15p 0 value
d pEditCode 1 const options(*nopass)
// Trim & Edit a number at the same time.
//===============================================================
d editcode s 1
d rtnval s 20 varying
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.