Click here to Skip to main content
15,905,967 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Damn c# { }'s Pin
Member 460224124-Apr-15 7:07
Member 460224124-Apr-15 7:07 
GeneralRe: Damn c# { }'s Pin
Mark Miller24-Apr-15 7:10
Mark Miller24-Apr-15 7:10 
GeneralRe: Damn c# { }'s Pin
Member 1055573527-Apr-15 5:36
Member 1055573527-Apr-15 5:36 
GeneralRe: Damn c# { }'s Pin
brianriggan24-Apr-15 8:18
brianriggan24-Apr-15 8:18 
GeneralRe: Damn c# { }'s Pin
nocturns224-Apr-15 9:29
nocturns224-Apr-15 9:29 
GeneralRe: Damn c# { }'s Pin
Umair Zuberi25-Apr-15 2:15
Umair Zuberi25-Apr-15 2:15 
GeneralRe: Damn c# { }'s Pin
pt140125-Apr-15 21:02
pt140125-Apr-15 21:02 
GeneralRe: Damn c# { }'s Pin
Frank Peelo25-Apr-15 22:57
Frank Peelo25-Apr-15 22:57 
RossMW wrote:
Do you have any tips on keeping these damn { } under control?


Always, always, always have my opening and closing brackets in the same row or column. And put comments after }, as Member 10707677said.

Trying to figure out where the missing { is when people put the opening { on the same line as the function or if, is just making life unnecessarily hard. And sometimes I come across conditions that are so ugly, I have to do it there too...

if (((x==0) && (y==1)) && (z==2) && ((w==3) && foo==bar))


if (  ((x==0) && (y==1)) 
   && (z==2) 
   && ((w==3) && foo==bar)
   )


Occasionally, I have to go and ask whoever wrote it... why?
GeneralThe pleasure of :: Pin
W Balboos, GHB23-Apr-15 9:04
W Balboos, GHB23-Apr-15 9:04 
GeneralRe: The pleasure of :: Pin
Mike Hankey23-Apr-15 9:30
mveMike Hankey23-Apr-15 9:30 
JokeRe: The pleasure of :: Pin
ZurdoDev23-Apr-15 10:19
professionalZurdoDev23-Apr-15 10:19 
GeneralRe: The pleasure of :: (required reply) Pin
W Balboos, GHB24-Apr-15 1:09
W Balboos, GHB24-Apr-15 1:09 
GeneralRe: The pleasure of :: Pin
Brisingr Aerowing23-Apr-15 10:59
professionalBrisingr Aerowing23-Apr-15 10:59 
GeneralRe: The pleasure of :: Pin
Marc Clifton23-Apr-15 11:46
mvaMarc Clifton23-Apr-15 11:46 
GeneralRe: The pleasure of :: Pin
Jeremy Falcon23-Apr-15 12:18
professionalJeremy Falcon23-Apr-15 12:18 
GeneralRe: The pleasure of :: Pin
W Balboos, GHB24-Apr-15 1:19
W Balboos, GHB24-Apr-15 1:19 
GeneralThought of the day PinPopular
OriginalGriff23-Apr-15 5:57
mveOriginalGriff23-Apr-15 5:57 
JokeRe: Thought of the day Pin
Afzaal Ahmad Zeeshan23-Apr-15 6:14
professionalAfzaal Ahmad Zeeshan23-Apr-15 6:14 
GeneralRe: Thought of the day Pin
Mike Hankey23-Apr-15 6:14
mveMike Hankey23-Apr-15 6:14 
GeneralRe: Thought of the day Pin
Slacker00723-Apr-15 6:20
professionalSlacker00723-Apr-15 6:20 
GeneralRe: Thought of the day Pin
Gary R. Wheeler23-Apr-15 6:21
Gary R. Wheeler23-Apr-15 6:21 
GeneralRe: Thought of the day Pin
Ravi Bhavnani23-Apr-15 6:24
professionalRavi Bhavnani23-Apr-15 6:24 
GeneralRe: Thought of the day Pin
RUs12323-Apr-15 20:53
RUs12323-Apr-15 20:53 
GeneralRe: Thought of the day Pin
PIEBALDconsult23-Apr-15 7:20
mvePIEBALDconsult23-Apr-15 7:20 
GeneralRe: Thought of the day Pin
Abhinav S23-Apr-15 8:19
Abhinav S23-Apr-15 8:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.