Click here to Skip to main content
15,886,919 members

Survey Results

Do you wrap single line statements in braces (or begin/end)?   [Edit]

Survey period: 16 May 2011 to 23 May 2011

Do you:

if (condition)
    statement
or
if (condition)
{
    statement
}
(Replace {}'s with Begin/End or whatever is appropriate for your language du jour)

OptionVotes% 
I always wrap single line statements95548.04
I sometimes wrap single line statements57328.82
I never wrap single line statements - only multiple lines get wrapped.46023.14



 
GeneralSometimes Pin
hairy_hats15-May-11 21:48
hairy_hats15-May-11 21:48 
GeneralAlways Wrap Pin
Kunal Chowdhury «IN»15-May-11 21:07
professionalKunal Chowdhury «IN»15-May-11 21:07 
GeneralRe: Always Wrap Pin
senguptaamlan15-May-11 21:20
senguptaamlan15-May-11 21:20 
GeneralRe: Always Wrap Pin
HaBiX15-May-11 21:57
HaBiX15-May-11 21:57 
GeneralRe: Always Wrap Pin
Toniyo Jackson16-May-11 1:43
Toniyo Jackson16-May-11 1:43 
GeneralRe: Always Wrap Pin
RaviRanjanKr16-May-11 4:20
professionalRaviRanjanKr16-May-11 4:20 
GeneralConsistency and Readability Pin
R. Erasmus15-May-11 21:06
R. Erasmus15-May-11 21:06 
GeneralOnly if else condition requires braces Pin
Davide Zaccanti15-May-11 20:04
Davide Zaccanti15-May-11 20:04 
Single:

if ( pWnd == NULL)
return;


Multiple:

if ( pWnd == NULL) {
return;
} else if ( pWnd->IsWindowVisible()) {
return;
}
GeneralUsing blocks help to avoid silly mishaps later on Pin
bob1697215-May-11 19:47
bob1697215-May-11 19:47 
GeneralRe: Using blocks help to avoid silly mishaps later on Pin
Kanasz Robert15-May-11 20:38
professionalKanasz Robert15-May-11 20:38 
GeneralRe: Using blocks help to avoid silly mishaps later on Pin
Ra-one15-May-11 20:48
Ra-one15-May-11 20:48 
GeneralAlways wraped.. Pin
ShilpiP15-May-11 19:46
ShilpiP15-May-11 19:46 
GeneralRe: Always wraped.. Pin
Kunal Chowdhury «IN»15-May-11 21:07
professionalKunal Chowdhury «IN»15-May-11 21:07 
GeneralRe: Always wraped.. Pin
ShilpiP15-May-11 21:10
ShilpiP15-May-11 21:10 
GeneralRe: Always wraped.. Pin
Tarun.K.S16-May-11 1:49
Tarun.K.S16-May-11 1:49 
GeneralRe: Always wraped.. Pin
ShilpiP16-May-11 1:55
ShilpiP16-May-11 1:55 
GeneralI don't wrap at some places like... Pin
Venkatesh Mookkan15-May-11 19:36
Venkatesh Mookkan15-May-11 19:36 
GeneralRe: I don't wrap at some places like... Pin
thatraja16-May-11 5:40
professionalthatraja16-May-11 5:40 
GeneralSingle statements without braces are more readable. Pin
GPUToaster™15-May-11 18:53
GPUToaster™15-May-11 18:53 
GeneralRe: Single statements without braces are more readable. Pin
Jigar K Oza15-May-11 18:55
Jigar K Oza15-May-11 18:55 
GeneralRe: Single statements without braces are more readable. Pin
Niklas L15-May-11 20:30
Niklas L15-May-11 20:30 
GeneralRe: Single statements without braces are more readable. Pin
Jigar K Oza15-May-11 20:56
Jigar K Oza15-May-11 20:56 
GeneralRe: Single statements without braces are more readable. Pin
Niklas L15-May-11 21:02
Niklas L15-May-11 21:02 
GeneralRe: Single statements without braces are more readable. Pin
Jigar K Oza15-May-11 21:17
Jigar K Oza15-May-11 21:17 
GeneralRe: Single statements without braces are more readable. Pin
Niklas L15-May-11 21:41
Niklas L15-May-11 21:41 

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.