Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualPhil123

Posted 24 April 2013 - 08:53 PM

I generally prefer things like this:

 

 

if (something)
    ;
else
    ;
 
if (something)
{
    if (somethingElse)
      ;
   else
      ;
}
 
for (int i = 0; i < someNumber; i++)
{
   if (something)
   {
      if (somethingElse)
         ;
      else
         ;
   }
}

 

But I would never:

 

 

if (something) {
    ;
}

 

As going back and checking to ensure all the braces are in their correct spot would be tiresome.  It's far easier to double check when they're all vertically lined up.  (Though this is my own preference.  If I got paid to do it in some weird way, then so be it).


#2Phil123

Posted 24 April 2013 - 08:52 PM

I generally prefer things like this:

 

 

if (something)
    ;
else
    ;
 
if (something)
{
    if (something)
      ;
   else
      ;
}
 
for (int i = 0; i < someNumber; i++)
{
   if (something)
   {
      if (somethingElse)
         ;
      else
         ;
   }
}

 

But I would never:

 

 

if (something) {
    ;
}

 

As going back and checking to ensure all the braces are in their correct spot would be tiresome.  It's far easier to double check when they're all vertically lined up.  (Though this is my own preference.  If I got paid to do it in some weird way, then so be it).


#1Phil123

Posted 24 April 2013 - 08:52 PM

I generally prefer things like this:

 

if (something)
    ;
else
    ;
 
if (something)
{
    if (something)
       ;
   else
      ;
}
 
for (int i = 0; i < someNumber; i++)
{
   if (something)
   {
      if (somethingElse)
         ;
      else
         ;
   }
}

 

But I would never:

 

if (something) {
    ;
}

 

As going back and checking to ensure all the braces are in their correct spot would be tiresome.  It's far easier to double check when they're all vertically lined up.  (Though this is my own preference.  If I got paid to do it in some weird way, then so be it).


PARTNERS