I'd like to expand a bit on Corion's fine response. In general, you should take it as a big red flag whenever you have many (and in your case, MANY) separate variables, which are all somehow related. Perhaps they share a common prefix, or are an incrementing pattern (such as your code). This red flag should make you consider using a datastructure that actually relates the values together by more than just a name.
Another big red flag is repetition. Having 36 lines of code that are only different by a few characters should make you stop and think. Copying and pasting things many times is not something you should be doing very often. Subroutines often help avoid this (all-too-common) syndrome.
Both of these things are present in your program, and in very large doses. Corion gives a nice example of how to clean this specific code up, but the ideas are more general. Use real data structures, use loops, and use subroutines. Copying and pasting is almost always wrong. :-)
Update: cleaned up some wording.
In reply to Re: Switch statement?
by revdiablo
in thread Switch statement?
by crep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |