Click here to Skip to main content
15,901,373 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: Coding standards: curly bracket style Pin
Foothill15-Sep-16 3:29
professionalFoothill15-Sep-16 3:29 
GeneralRe: Coding standards: curly bracket style Pin
Nish Nishant15-Sep-16 3:33
sitebuilderNish Nishant15-Sep-16 3:33 
GeneralRe: Coding standards: curly bracket style Pin
OriginalGriff15-Sep-16 3:41
mveOriginalGriff15-Sep-16 3:41 
GeneralRe: Coding standards: curly bracket style Pin
PeejayAdams15-Sep-16 4:13
PeejayAdams15-Sep-16 4:13 
GeneralRe: Coding standards: curly bracket style Pin
OriginalGriff15-Sep-16 4:26
mveOriginalGriff15-Sep-16 4:26 
GeneralRe: Coding standards: curly bracket style Pin
PeejayAdams15-Sep-16 4:45
PeejayAdams15-Sep-16 4:45 
GeneralRe: Coding standards: curly bracket style Pin
Jörgen Andersson15-Sep-16 6:43
professionalJörgen Andersson15-Sep-16 6:43 
GeneralRe: Coding standards: curly bracket style Pin
TNCaver16-Sep-16 4:22
TNCaver16-Sep-16 4:22 
This! Thumbs Up | :thumbsup:

Stroustrup K&R is what I learned, and seems more logical to me (and easier on my eyes). Brackets separate a block of code that is performed as part of a command, so to my mind the opening bracket belongs on the same line as the command.
C#
if (true) {
  DoThis();
}
VB adopts K&R in its own way. Note the keywords and closing keywords:
VB
If True Then
  DoThis()
End If
But now I've probably hurt my case. Laugh | :laugh:

(edited to clarify the Stroustrup version of K&R)
If you think 'goto' is evil, try writing an Assembly program without JMP.

GeneralRe: Coding standards: curly bracket style Pin
PauloJuanShirt15-Sep-16 3:48
PauloJuanShirt15-Sep-16 3:48 
GeneralRe: Coding standards: curly bracket style Pin
Vark11115-Sep-16 5:20
Vark11115-Sep-16 5:20 
GeneralRe: Coding standards: curly bracket style Pin
Joe Woodbury15-Sep-16 5:54
professionalJoe Woodbury15-Sep-16 5:54 
GeneralRe: Coding standards: curly bracket style Pin
Dan Neely15-Sep-16 5:54
Dan Neely15-Sep-16 5:54 
GeneralRe: Coding standards: curly bracket style Pin
Vark11115-Sep-16 7:17
Vark11115-Sep-16 7:17 
GeneralRe: Coding standards: curly bracket style Pin
VirtualJack15-Sep-16 22:34
VirtualJack15-Sep-16 22:34 
GeneralRe: Coding standards: curly bracket style Pin
lopatir16-Sep-16 10:10
lopatir16-Sep-16 10:10 
GeneralRe: Coding standards: curly bracket style Pin
charlieg17-Sep-16 10:31
charlieg17-Sep-16 10:31 
GeneralRe: Coding standards: curly bracket style Pin
Robert Blair18-Sep-16 14:13
Robert Blair18-Sep-16 14:13 
GeneralRe: Coding standards: curly bracket style Pin
NOD32 user10-Nov-16 15:38
NOD32 user10-Nov-16 15:38 
GeneralRe: Coding standards: curly bracket style Pin
den2k8815-Sep-16 4:16
professionalden2k8815-Sep-16 4:16 
GeneralRe: Coding standards: curly bracket style Pin
NandaKumer15-Sep-16 5:39
NandaKumer15-Sep-16 5:39 
GeneralRe: Coding standards: curly bracket style Pin
W Balboos, GHB15-Sep-16 7:37
W Balboos, GHB15-Sep-16 7:37 
GeneralRe: Coding standards: curly bracket style Pin
Gary Wheeler16-Sep-16 0:57
Gary Wheeler16-Sep-16 0:57 
GeneralRe: Coding standards: curly bracket style Pin
TNCaver16-Sep-16 3:55
TNCaver16-Sep-16 3:55 
GeneralRe: Coding standards: curly bracket style Pin
kalberts16-Sep-16 4:19
kalberts16-Sep-16 4:19 
GeneralRe: Coding standards: curly bracket style Pin
OriginalGriff16-Sep-16 4:45
mveOriginalGriff16-Sep-16 4:45 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   507 votes