Ok, since you have the string to be parsed, you will need a parser too! I dont have anything ready at hand but, I'll give it a shot anyway. UNTESTED CODE FOLLOWS
You could modify this code to do a repetitive parse. Every time you call it, it would return you a number, but I'll leave that to you.Code:' assume the string is TOPARSE ' it will return you 2 numbers, one from before the comma, one from after the comma Number1 var Long Number2 var Long Cntr var byte ' counter to index the string ParseNumber: Number1 = 0 ' start with 0 in both numbers Number2 = 0 'collect Number1 for Cntr = 0 to 10 ' you said your string is 10 places long if TOPARSE[Cntr] <> "," then Number1=Number1*10 ' x10 to make place for the new digit Number1 = Number1+TOPARSE[Cntr]-'0' ' I'm assuming this is an ASCII string else goto GetNum2 ' collect the remainder as number2 endif next return GetNum2: for Cntr=Cntr+1 to 10 if TOPARSE[Cntr] <> "," then Number2=Number2*10 Number2 = Number2+TOPARSE[Cntr]-'0' ' I'm assuming this is an ASCII string else return ' because, you said there are only 2 numbers ;) endif next return
Good luck.
Bookmarks