Originally posted by Tom Blough:
I would suggest parsing the typed string from the right end. If the user enters +01234, start with the 4. The number you are trying to construct is 4x10e0.
Now get the next to last character - 3. The resulting number is now the previous value + 3x10e1. Then next would be 2x10e2 and so on until you reach the start of the string.
If the start of the string is a + or - then change the sign of the number accordingly, if it is another numeric character, process it like the previous ones.
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter