Click here to Skip to main content
15,918,706 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.

 
GeneralRe: Redundant Coding: The new paradigm! Pin
hairy_hats17-Sep-10 2:19
hairy_hats17-Sep-10 2:19 
GeneralRe: Redundant Coding: The new paradigm! Pin
BillW3310-Sep-10 9:40
professionalBillW3310-Sep-10 9:40 
GeneralRe: Redundant Coding: The new paradigm! Pin
AspDotNetDev9-Sep-10 11:37
protectorAspDotNetDev9-Sep-10 11:37 
JokeRe: Redundant Coding: The new paradigm! Pin
Chris Meech10-Sep-10 1:15
Chris Meech10-Sep-10 1:15 
GeneralRe: Redundant Coding vs rewrite vs Joel Pin
pg--az11-Sep-10 22:17
pg--az11-Sep-10 22:17 
GeneralRe: Redundant Coding vs rewrite vs Joel Pin
Richard A. Dalton12-Sep-10 23:15
Richard A. Dalton12-Sep-10 23:15 
GeneralRe: Redundant Coding vs rewrite vs Asp.net-Crypto-Attack Pin
pg--az14-Sep-10 22:17
pg--az14-Sep-10 22:17 
GeneralRe: Redundant Coding: The new paradigm! Pin
patbob17-Sep-10 7:13
patbob17-Sep-10 7:13 
GeneralRe: Redundant Coding: The new paradigm! Pin
BrainiacV24-Sep-10 3:04
BrainiacV24-Sep-10 3:04 
GeneralConstructor reading Session Variables Pin
Richard A. Dalton8-Sep-10 0:48
Richard A. Dalton8-Sep-10 0:48 
GeneralRe: Constructor reading Session Variables Pin
GibbleCH8-Sep-10 3:52
GibbleCH8-Sep-10 3:52 
GeneralRe: Constructor reading Session Variables Pin
Richard A. Dalton8-Sep-10 4:08
Richard A. Dalton8-Sep-10 4:08 
GeneralRe: Constructor reading Session Variables Pin
hammerstein058-Sep-10 6:39
hammerstein058-Sep-10 6:39 
GeneralRe: Constructor reading Session Variables Pin
Kunal Chowdhury «IN»11-Sep-10 22:03
professionalKunal Chowdhury «IN»11-Sep-10 22:03 
GeneralRe: Constructor reading Session Variables Pin
PIEBALDconsult8-Sep-10 4:05
mvePIEBALDconsult8-Sep-10 4:05 
GeneralRe: Constructor reading Session Variables Pin
Ian Shlasko8-Sep-10 4:51
Ian Shlasko8-Sep-10 4:51 
GeneralRe: Constructor reading Session Variables Pin
Richard A. Dalton8-Sep-10 5:23
Richard A. Dalton8-Sep-10 5:23 
GeneralRe: Constructor reading Session Variables Pin
CDP18029-Sep-10 0:55
CDP18029-Sep-10 0:55 
GeneralRe: Constructor reading Session Variables Pin
Andrew Rissing9-Sep-10 4:21
Andrew Rissing9-Sep-10 4:21 
GeneralRe: Constructor reading Session Variables Pin
Kunal Chowdhury «IN»11-Sep-10 22:02
professionalKunal Chowdhury «IN»11-Sep-10 22:02 
GeneralWhere is the exit? PinPopular
red_moon6-Sep-10 2:46
red_moon6-Sep-10 2:46 
GeneralRe: Where is the exit? Pin
DaveAuld6-Sep-10 3:16
professionalDaveAuld6-Sep-10 3:16 
Is this a modern Where's Wally?

red_moon wrote:
Where is the exit?



Private Function xxx(ByVal name As String) As Boolean
    Dim xxxResult As Boolean = False
    If name = "A" Then
        ' Lots of code here
        Return xxxResult
    Else
        ' Lots of code here
        Return xxxResult
    End If
    ' Lots of code again
    Return xxxResult
    Exit Function             <------Its there just before the word function; Whats the prize?
End Function


Ok, so he's using multiple return points, and there is no requirement here for the Exit Function statement as it is at the end.
Dave

Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn

GeneralRe: Where is the exit? Pin
red_moon6-Sep-10 6:42
red_moon6-Sep-10 6:42 
AnswerRe: Where is the exit? Pin
Kunal Chowdhury «IN»6-Sep-10 18:46
professionalKunal Chowdhury «IN»6-Sep-10 18:46 
GeneralRe: Where is the exit? Pin
DaveAuld7-Sep-10 23:47
professionalDaveAuld7-Sep-10 23:47 

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.