×
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.
Joep Beckeringh wrote:
Have you considered %dec or %dech?
James H. H. Lampert wrote:
At first, I thought you were onto something. Then I tried it.
These functions take numeric expressions, not strings containing
representations of numbers.
No, they take character strings alright. Using your original examples:
D DecField S 5 2
C Eval MyDecField = %Dec( '123.45' : 5 : 2 )
C Eval MyDecField = %Dec( ' 1.23' : 5 : 2 )
C Eval MyDecField = %Dec( '1.23' : 5 : 2 )
C Eval MyDecField = %Dec( '1.2' : 5 : 2 )
C Eval MyDecField = %Dec( '123' : 5 : 2 )
The reason I pointed you to the QC2LE function in the first place was that
'atof' handles extra characters like thousand separators better than
%Dec/%DecH ... but this is irrelevant for the examples you gave so the
above will work fine.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.