× 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 did not know this! Thanks pots & pots.
Birgitta Hauser wrote:
First, are there any embedded blanks within the numeric portion of the pro number?
If so, that is another piece of the problem to deal with, and in that caseI would probably load the pro number into a 20 element array and then do a
for-loop through each element of the array and pick off each numeric
element.

The built-in-functions %DEC/%DECH and %INT/%INTH ignore/remove embedded
blanks.
That means the following examples work:

D String S 50A
D Num S 15P 5
/Free
String = ' 123.45 ';
Num = %Dec(String: 15: 5) //Num = 123.45000
String = ' 12 345. 67 ';
Num = %Dec(String: 15: 5); //Num = 12345.6700

String = ' + 123 456, 12 345 ';
Num = %Dec(String: 15: 5) //Num = 123456.12345

String = ' 1 3 5 . 7 9 - ';
Num = %Dec(String: 15: 5) //Num = - 135.79

String = *Blanks;
Num = %Dec(String: 15: 5) //--> Operation fails!!!

/End-Free

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.