|
This may have been answered beofre, but I just wanted to verify what I did is ok, or if I should have done it a different way. I am reading a comma delimited file, and one of the fields is a dollar amount. I want to take the dollar amount which is now in a text string of 10 character or so, ie: '123.45' and I want to convert it to a zoned 17,2 but when I used the atof operation, I was always get a value 1 penny less that the string that I initially read. So I added the (H) to the eval command and it solved the problem.. c eval(h) CheckAmount = atof(fld8) My question is this, is that OK? Or should I get the dollar amount from the string a different way? Also I did add the H spec to respect decimal position, but that didn't help the problem... thanks, for any input.... tim +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.