>  <SNIP>
>My doubt is: what's the best/easiest way of converting
>a [string] input of e.g. '48,55' to an integer type
>with the value '4855'?
>
>Michel.P
>

First normalize the string input.  Make sure you have exactly two
decimal places, strip any non-numeric characters, detect whether
the currency value is positive or negative.

If the maximum size is less than 10 digits, then use StrAToI() to
convert the resulting simple numeric string.  Then assign negative
as necessary..

If you are dealing with numbers larger than 9 digits, you'll have to
split it into two parts and merge them back later.

Roger Stringer
Marietta Systems, Inc. (www.RF-TP.com)


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to