|
Post by Hauskaz on Jul 17, 2009 16:00:47 GMT -5
Brace on the same line:
CSS body { display: block; background-color: white; }
Java if (number == 3) { System.out.print("The number is three."); } else { System.out.print("The number is not three."); }
PHP if ($number == 3) { echo "The number is three."; } else { echo "The number is not three."; }
Brace on the next line:
CSS body { display: block; background-color: white; }
Java if (number == 3) { System.out.print("The number is three."); } else { System.out.print("The number is not three."); }
PHP if ($number == 3) { echo "The number is three."; } else { echo "The number is not three."; }
|
|
|
Post by Cheesemaster IV on Jul 17, 2009 16:15:48 GMT -5
Brace on the next line is so much neater.
|
|
|
Post by Daryl on Jul 17, 2009 17:16:57 GMT -5
I concur with Michael.
No braces is even neater than that, though.
|
|
|
Post by Cheesemaster IV on Jul 17, 2009 17:17:38 GMT -5
It won't work if you don't put the braces.
|
|
|
Post by Daryl on Jul 17, 2009 17:40:47 GMT -5
I was referring to Python.
|
|
|
Post by hellomeow on Jul 17, 2009 17:43:15 GMT -5
I thought the if/else statements in Java would have worked fine without brackets being single line procedures.
|
|
|
Post by Hauskaz on Jul 17, 2009 18:50:07 GMT -5
They technically aren't needed in the examples I provided, but that's not the point. In practice, I include them anyways for consistency and in case I decide to modify it later.
|
|
|
Post by Cunt Wrap Supreme on Jul 17, 2009 20:03:16 GMT -5
a { b }
Can't stand having it on another line
|
|
|
Post by Hauskaz on Jul 17, 2009 20:19:26 GMT -5
Placing it on the next line is disgusting.
|
|
|
Post by Cheesemaster IV on Jul 17, 2009 20:24:06 GMT -5
You're disgusting.
|
|
|
Post by elbow unit on Jul 17, 2009 20:25:39 GMT -5
|
|
|
Post by Duvet on Jul 17, 2009 20:48:06 GMT -5
next line
|
|
|
Post by Hauskaz on Jul 19, 2009 15:16:18 GMT -5
I wish ProBoards wouldn't obliterate tabbing.
|
|