Current Events > Programmers of CE: How do you use braces?

Topic List
Page List: 1
nikko004
04/10/17 11:14:13 PM
#1:


Poll() {




Example:

1:
.function() { statement }
or
.function() {
. statement }

2:
.function() {
. statement
.}

3:
.function()
.{
. statement }

4:
.function()
.{
. statement
.}

---
How to open a door, Step one: http://i.imgur.com/EWKRS.gif
Check out our LPs! http://youtube.com/user/JewSalt
... Copied to Clipboard!
Puglia77
04/10/17 11:15:10 PM
#2:


... Copied to Clipboard!
Logos
04/10/17 11:16:31 PM
#3:


the fuck is up with #1 and #3
---
My biggest flaw is how logical and reasonable I am. - hockeybub89
... Copied to Clipboard!
Frostshock
04/10/17 11:30:54 PM
#4:


4 for functions and loops/ifs with multi-line conditions.

2 for loops/ifs with single-line conditions.
---
Got questions about schoolwork? Want to share answers, or discuss your studies? Come to Homework Helpers!
http://www.gamefaqs.com/boards/1060-homework-helpers
... Copied to Clipboard!
SoundNetwork
04/10/17 11:33:45 PM
#5:


Frostshock posted...
4 for functions and loops/ifs with multi-line conditions.

2 for loops/ifs with single-line conditions.

be consistent
---
... Copied to Clipboard!
Frostshock
04/10/17 11:39:14 PM
#6:


SoundNetwork posted...
Frostshock posted...
4 for functions and loops/ifs with multi-line conditions.

2 for loops/ifs with single-line conditions.

be consistent


It's consistently beautiful.
---
Got questions about schoolwork? Want to share answers, or discuss your studies? Come to Homework Helpers!
http://www.gamefaqs.com/boards/1060-homework-helpers
... Copied to Clipboard!
BigTee66
04/10/17 11:39:54 PM
#7:


4, nuff said
---
MSI Z170-A PRO LGA 1151 | i5 6500K | ASUS ROG GeForce GTX 1070 | 8GB DDR4 x 2 | EVGA 650W | Inwin 703 Black |
Steam: teeman92
... Copied to Clipboard!
Logos
04/10/17 11:40:06 PM
#8:


Frostshock posted...
SoundNetwork posted...
Frostshock posted...
4 for functions and loops/ifs with multi-line conditions.

2 for loops/ifs with single-line conditions.

be consistent


It's consistently beautiful.


nah fam, consistency is beautiful.
---
My biggest flaw is how logical and reasonable I am. - hockeybub89
... Copied to Clipboard!
#9
Post #9 was unavailable or deleted.
Manocheese
04/10/17 11:45:31 PM
#10:


I use 4 for most things except single-line properties:

public string MyString { get; set; }
---
()_() Hardcore - We'll probably be modded for this...
(o.o) http://manocheese.googlepages.com/manocheesery
... Copied to Clipboard!
KeyBlade999
04/10/17 11:46:06 PM
#11:


Puglia77 posted...
Anything except 4 is wrong

---
''I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are.'' - Mewtwo
... Copied to Clipboard!
Logos
04/10/17 11:47:50 PM
#12:


I prefer #4, but if #2 is used consistently it can save quite a bit of lines in a codebase.

Ultimately, saving lines that way doesn't really help with anything. So #4 all the way.
---
My biggest flaw is how logical and reasonable I am. - hockeybub89
... Copied to Clipboard!
Sad_Face
04/10/17 11:49:40 PM
#13:


I can't stand 2). I need consistency.

But for 1 liners like if statements, I do this

if(condition)
. {Do something}

---
imgtc.com/i/4HgTl0ebzq.jpg imgtc.com/i/60CWP2Gtlg.gif
... Copied to Clipboard!
Logos
04/10/17 11:50:27 PM
#14:


Sad_Face posted...
I can't stand 2). I need consistency.

But for 1 liners like if statements, I do this

if(condition)
{Do something}


the fuck?

if you want shortcuts, why not just do
if (condition) do something
---
My biggest flaw is how logical and reasonable I am. - hockeybub89
... Copied to Clipboard!
Sad_Face
04/10/17 11:51:57 PM
#15:


Logos posted...
the f***?

if you want shortcuts, why not just do
if (condition) do something


Melodramatic much?

I wasn't aware of doing that before I saw the OP, but I can't claim to do it since I haven't done it yet.
---
imgtc.com/i/4HgTl0ebzq.jpg imgtc.com/i/60CWP2Gtlg.gif
... Copied to Clipboard!
Philoktetes
04/10/17 11:54:33 PM
#17:


>calling brackets braces

TC are you a foreigner
---
I don't think so, Tim.
~~ Pizza Crew ~~
... Copied to Clipboard!
Johnny_Nutcase
04/10/17 11:55:13 PM
#18:


Logos posted...
Sad_Face posted...
Logos posted...
the f***?

if you want shortcuts, why not just do
if (condition) do something


Melodramatic much?

I wasn't aware of doing that before I saw the OP, but I can't claim to do it since I haven't done it yet.


What the fuck did you just fucking say about me, you little bitch? I’ll have you know I graduated top of my class in the Navy Seals, and I’ve been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I’m the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You’re fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that’s just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn’t, you didn’t, and now you’re paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You’re fucking dead, kiddo.


HAHA. This guy got PISSED.
---
I've learned that life is one crushing defeat after another... until you just wish Flanders was dead. - Homer Simpson
... Copied to Clipboard!
HashtagTartarus
04/10/17 11:55:14 PM
#19:


#1 for single-line stuff, #4 for anything longer
---
... Copied to Clipboard!
Sad_Face
04/11/17 12:20:59 AM
#20:


Logos posted...
Sad_Face posted...
Logos posted...
the f***?

if you want shortcuts, why not just do
if (condition) do something


Melodramatic much?

I wasn't aware of doing that before I saw the OP, but I can't claim to do it since I haven't done it yet.


What the fuck did you just fucking say about me, you little bitch? I’ll have you know I graduated top of my class in the Navy Seals, and I’ve been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I’m the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You’re fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that’s just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn’t, you didn’t, and now you’re paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You’re fucking dead, kiddo.


What the fuck did you just fucking say about me, you little starting condition? I’ll have you know I graduated top of my class in the MIT, and I’ve been initiated in numerous secret techniques on Al-Gebra, and I have over 300 confirmed integrations. I am trained in gorilla mathematics and I’m the top math wiz in the entire set of US computational forces. You are nothing to me but just another equation. I will solve you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking definitions. You think you can get away with simplifying that fraction that way over the Internet? Think again, factorial. As we speak I am contacting my secret network of underground mathematicians across the world and your domain is being traced right now so you better prepare for the tangent, maggot. The tangent that wipes out that little unknown variable you call your life.You’re fucking summed, sequence. I can be anywhere, anytime, and I can solve you in over seven hundred ways, and that’s just with my pen and paper. Not only am I extensively trained in calculating by hand, but I have access to the entire arsenal of the Texas Instruments Calculator Corps and I will use it to its full extent to wipe your miserable x's off the face of the page, you little inkstain. If only you could have known what unholy differentiation your little “trigonometric” problem was about to bring down upon you, maybe you would have held your exponential range. But you couldn’t, you didn’t, and now you’re paying the price, you goddamn polynomial. I will prove fury all over you and you will drown in it. You’re solved dead, limit.
---
imgtc.com/i/4HgTl0ebzq.jpg imgtc.com/i/60CWP2Gtlg.gif
... Copied to Clipboard!
PalmerSensei
04/11/17 12:42:44 AM
#21:


#2
---
You have the castle, but not the king. You have Rome, but not its emperor. I am the conqueror of your kingdom, and you know it's true. - Mr.GGFan
... Copied to Clipboard!
iosifsvoboda
04/11/17 12:46:10 AM
#22:


This topic got serious damn
---
^_^
... Copied to Clipboard!
#23
Post #23 was unavailable or deleted.
meingott
04/11/17 12:56:34 AM
#24:


you can get warned for the navy seal copypasta?
... Copied to Clipboard!
OwlRammer
04/11/17 12:58:07 AM
#25:


2 since this book I used had the examples like that so I just got used to it like that
---
... Copied to Clipboard!
Medussa
04/11/17 1:06:42 AM
#26:


meingott posted...
you can get warned for the navy seal copypasta?


he's been aggressively shitposting all night. who knows what post actually got him, just enjoy the break.
---
Boom! That's right, this is all happening! You cannot change the channel now!
Act now! Venchmen are standing by for your orders!
... Copied to Clipboard!
kirbymuncher
04/11/17 1:13:45 AM
#27:


2

although sometiems I'll do the first version of 1 if it's a short singleliner
---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
Topic List
Page List: 1