I need some help using array's more efficiently. The manual (PBP 2.6) has little information on practical usage of arrays though I have seen a few examples around the forum, but no references.

I am receiving serial data into an array and I need to sort the reply (ASCII) into the different messages. Currently I use lots of IF.. THEN.. statements and am looking for something a little less cumbersome.

Typical messages received:-
OK!
DONE
!ERROR!
0152:00000000
015E:00012345
all terminated with a carriage return.

Any suggestions?
Cheers,
Tim.