Data parsing question

What issues do you have with serial.available?

None the way my code is written. if I do as you suggest and remove one of the conditional statements, there is a repeating spew of data.

"hide your methods from main"

Not sure why that would apply to code that is correctly written that compiles and runs. Is there a technical reason or perhaps a coding superstitious behavior from the old days?

If you have an arduino, why is it not tested? If it works, then post up the complete parcing code like I did (It should not much more complex than what I posted). I'm trying to see code that actually works so I can study it. That is one of the problems I've found in the forum, 80%+ of the solutions posted for us nubies is non functional code "snipits" which is often of little use to a nubie.

This does not rely on the non-structured approach and can detect errors in input.

I've not seen the interpertaion of what constitutes structured vs. nonstructured, so I'm clueless there. What errors is your code catching? If it is the "termination failure", considering how fast the arduino loops, that failure may happen every time if some loop delay is not provided.