× 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 don't deal with multi-national data, but hopefully you would have a
field to state the origin of the data (like a country code for
instance).

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta
Sent: Tuesday, December 30, 2008 8:52 AM
To: RPG programming on the IBM i / System i
Subject: Re: Converting a string to a number in RPG

rob@xxxxxxxxx wrote:
So, in a multilingual application how would one convert all these?
"1234567,89" European comma decimal point
"1,234,567,89" European comma decimal point, with thousand separators
"1,234,567.89" American period decimal point, with thousand
separators
"123,456,789" integer with thousand separators

Just a note: I don't think you can use comma as both a thousands and
decimal separator. It's either comma for thousands and period for
decimals (1,234.56) or periods for thousands and comma for decimal
(1.234,56). However, it's darned near impossible to be completely
agnostic, since "1,234" could be either one-thousand, two-hundred and
thirty-four or one and two-hundred and thirty-four one-thousandths,
depending on the locale.

Joe

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.