View Single Post
  #9 (permalink)  
Old 07-27-2007, 11:00 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Quote:
Originally Posted by andyp guru View Post
what about putting the default on the same line?. i think you should make functions for each case that way it makes the source code a lot easier to read.
For some reason, I don't recommend this... I'd rather have it organized this way:

Code:
case 1:
    // do something
    break;
case 2:
    // do something
    break;
it's much easier to understand and very organized. I don't know if it's only for me, hopefully other programmer feel the same way...? since programmers write codes so that other programmers can read it!!! XD

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote