Hi,
Sorry for the vague title.... Here's the scenario:

I'm receiving a variable length string over serial, starting with a letter, continuing with any number of decimal digits and ending with a CR. I stuff the incomming characters into an array and increments a "pointer" as I fill it up.

I need to take the value between the letter and the CR and put that into a variable, I use the "pointer" to determine how many characters I need to grab and then use something like:
Code:
ArrayRead RxBuffer [SKIP 1, DEC5 myValue]   'Skip the letter, then grap 5 digits.
No problem so far. But, since myValue is a word I need to make sure that I don't overflow it and I'm trying to come up with a solution to do that. If I receive more than 5 digits it's a done deal but if I receive 5 digits I need to know if those digits represents more than what can be stored in a word.

Anyone got a slick way of doing it?

Thanks!
/Henrik.