Xbee communication

You send a letter. Let's say it's a 'C'.

There is a character to read. You read that letter. It's not an 'A', so you read another letter (oops). That's not a 'B', so you read another letter (double oops). You really need to compare the SAME letter to 'B', 'C', 'D', etc. That means, of course, that you need to save the letter.