View Single Post
Old Jan 14th, 2007, 6:54 AM   #6
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
The default behaviour of a switch statement is to fall through each case to the next one. That's why you usually have to put a "break" at the end of each case block. Remove each "goto" line and it should work as you wish.

As a rule of thumb, "goto" should never be used. I suspect there are extremely rare cases where it might be useful, but I have yet to discover any of these cases. Steer clear of goto.
Arevos is offline   Reply With Quote