Issues with using serial.avaliable to start a loop

Hi Bob, thanks for the suggestion, I've tried to implement this into the code, but I don't think I understand when to state the bool as true. Can you give me an example if you don't mind?