Click here to Skip to main content
15,900,110 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralOMG a "Goto" PinPopular
CARPETBURNER22-Oct-08 22:50
CARPETBURNER22-Oct-08 22:50 
GeneralRe: OMG a "Goto" Pin
CPallini23-Oct-08 0:11
mveCPallini23-Oct-08 0:11 
GeneralRe: OMG a "Goto" Pin
Member 407229923-Oct-08 0:27
Member 407229923-Oct-08 0:27 
GeneralRe: OMG a "Goto" Pin
CPallini23-Oct-08 0:48
mveCPallini23-Oct-08 0:48 
GeneralRe: OMG a "Goto" Pin
BadKarma23-Oct-08 1:56
BadKarma23-Oct-08 1:56 
GeneralRe: OMG a "Goto" Pin
MidwestLimey23-Oct-08 5:23
professionalMidwestLimey23-Oct-08 5:23 
GeneralRe: OMG a "Goto" Pin
VirtualVoid.NET23-Oct-08 6:13
VirtualVoid.NET23-Oct-08 6:13 
GeneralRe: OMG a "Goto" Pin
CPallini23-Oct-08 6:37
mveCPallini23-Oct-08 6:37 
It is NOT C/C++, my friend, it is C# Poke tongue | ;-P


Juraj Suchan wrote:
case 0:
case 1:
// do stuff for 0 and 1
break;


Fine: It is allowed.



Juraj Suchan wrote:
case 2:
// do stuff for 2
case 3:
// do stuff for 2 and 3
break;


That's not allowed in C# (well, in fact, it is allowed as it stands, with just comments Big Grin | :-D ).
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: OMG a "Goto" Pin
VirtualVoid.NET23-Oct-08 6:44
VirtualVoid.NET23-Oct-08 6:44 
GeneralRe: OMG a "Goto" Pin
johannesnestler11-Nov-08 5:28
johannesnestler11-Nov-08 5:28 
GeneralRe: OMG a "Goto" Pin
Dan Neely23-Oct-08 2:16
Dan Neely23-Oct-08 2:16 
GeneralRe: OMG a "Goto" Pin
Super Lloyd24-Oct-08 0:57
Super Lloyd24-Oct-08 0:57 
GeneralRe: OMG a "Goto" Pin
CPallini24-Oct-08 0:59
mveCPallini24-Oct-08 0:59 
GeneralRe: OMG a "Goto" Pin
Rob Grainger24-Oct-08 1:43
Rob Grainger24-Oct-08 1:43 
GeneralRe: OMG a "Goto" Pin
CPallini24-Oct-08 1:57
mveCPallini24-Oct-08 1:57 
GeneralRe: OMG a "Goto" Pin
Rob Grainger25-Oct-08 18:10
Rob Grainger25-Oct-08 18:10 
GeneralRe: OMG a "Goto" Pin
CPallini25-Oct-08 22:14
mveCPallini25-Oct-08 22:14 
JokeRe: OMG a "Goto" Pin
Andrew Rissing24-Oct-08 4:09
Andrew Rissing24-Oct-08 4:09 
GeneralRe: OMG a "Goto" Pin
johannesnestler11-Nov-08 5:43
johannesnestler11-Nov-08 5:43 
GeneralRe: OMG a "Goto" Pin
Thomas Weller24-Oct-08 1:27
Thomas Weller24-Oct-08 1:27 
GeneralRe: OMG a "Goto" Pin
Super Lloyd24-Oct-08 1:42
Super Lloyd24-Oct-08 1:42 
GeneralRe: OMG a "Goto" Pin
Thomas Weller24-Oct-08 2:58
Thomas Weller24-Oct-08 2:58 
GeneralRe: OMG a "Goto" Pin
johannesnestler11-Nov-08 5:47
johannesnestler11-Nov-08 5:47 
GeneralRe: OMG a "Goto" Pin
Rob Grainger24-Oct-08 1:48
Rob Grainger24-Oct-08 1:48 
GeneralRe: OMG a "Goto" Pin
CPallini24-Oct-08 2:45
mveCPallini24-Oct-08 2: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.