Click here to Skip to main content
15,313,377 members

Survey Results

Braces around single line commands. Needed or not?

Survey period: 12 Feb 2018 to 19 Feb 2018

It's just about the braces. Not about whether the leading brace should or should not be on the same line as the conditional. One war at a time.

I prefer

if (condition)
I prefer

if (condition)
It depends16417.86

GeneralRe: I prefer the missing option Pin
W Balboos, GHB12-Feb-18 0:25
mveW Balboos, GHB12-Feb-18 0:25 
GeneralRe: I prefer the missing option Pin
CodeWraith13-Feb-18 2:04
MemberCodeWraith13-Feb-18 2:04 
GeneralI prefer the middle solution, but ... Pin
OriginalGriff11-Feb-18 20:01
mveOriginalGriff11-Feb-18 20:01 
GeneralI always go ... Pin
Mehdi Gholam11-Feb-18 19:14
MemberMehdi Gholam11-Feb-18 19:14 
GeneralThis case is also applied to WHILE and FOR ....! Pin
koolprasadd11-Feb-18 18:21
professionalkoolprasadd11-Feb-18 18:21 
GeneralThose are BRACEs, not BRACKETs Pin
PIEBALDconsult11-Feb-18 18:11
professionalPIEBALDconsult11-Feb-18 18:11 
GeneralRe: Those are BRACEs, not BRACKETs Pin
effayqueue12-Feb-18 4:30
Membereffayqueue12-Feb-18 4:30 
GeneralRe: Those are BRACEs, not BRACKETs Pin
Marc Clifton12-Feb-18 8:41
mvaMarc Clifton12-Feb-18 8:41 
Lord, you would think a site dedicated to programming would know the difference between brackets and braces by the people who write the surveys. Or at least QA them. Laugh | :laugh:
Latest Article - Code Review - What You Can Learn From a Single Line of Code

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

Artificial intelligence is the only remedy for natural stupidity. - CDP1802

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.