I can think of at least half dozen more ways including: 1) ini file 2) regex 3) hash tables 4) goto 5) etc 6) ...... 7) whatever..
What I really need to know now is where do I apply for the $100,000/yr job writing msl?