View Single Post
  #15  
Old 03-30-2007, 04:41 PM
Grey Grey is offline
Classic Developer
Grey's Avatar
Join Date: Mar 2007
Location: Wales, UK
Posts: 134
Grey will become famous soon enough
Send a message via AIM to Grey
Quote:
Originally Posted by xXziroXx View Post
I prefer my way.

PHP Code:
  if(this==that) {
    
blah;
    
blah //zomg theoretical error
    
if(truecool;
  } 
With functions I always use brackets, with statements I tend to omit them if there is only one command by force of habit, but I do usually indent it still and move it to the next line. If there is an else following the if however I always use brackets. Personally I just find it looks a lot nicer that way. As far as spacing goes I agree with HR.

PHP Code:
function checkStyle() {
  if (
this.style == true) {
    
increaseAwesome();
  } else {
    
decreaseAwesome();
  }
  if (
noelse == true)
    
omit true;

Reply With Quote