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

 
QuestionRe: GOSUB .NET Pin
megaadam13-Aug-07 23:27
professionalmegaadam13-Aug-07 23:27 
GeneralRe: GOSUB .NET Pin
#realJSOP17-Aug-07 8:21
mve#realJSOP17-Aug-07 8:21 
JokeRe: GOSUB .NET Pin
BadKarma17-Aug-07 22:18
BadKarma17-Aug-07 22:18 
GeneralRe: GOSUB .NET Pin
#realJSOP18-Aug-07 1:15
mve#realJSOP18-Aug-07 1:15 
JokeRe: GOSUB .NET Pin
Paul Conrad18-Aug-07 3:37
professionalPaul Conrad18-Aug-07 3:37 
GeneralRe: GOSUB .NET Pin
Pascal Ganaye20-Aug-07 3:21
Pascal Ganaye20-Aug-07 3:21 
GeneralRe: GOSUB .NET Pin
Lutosław20-Aug-07 7:45
Lutosław20-Aug-07 7:45 
GeneralVisual Basic 6: Public versus Private Function Pin
Nilesh Hapse8-Aug-07 19:24
Nilesh Hapse8-Aug-07 19:24 
Well I don't know if anyone has seen this horror in Visual Basic 6.0 code.

One of my colleague was doing his assignment. Now say there are three functions Function1, Function2, Function3. Function1 is calling Function2.
But instead of going to Function2 it goes to Function3 D'Oh! | :doh: . Now I've seen this my own eyes Confused | :confused: .

We did try keeping a breakpoint at the call of Function2 from Function1. When this breakpoint is hit and I tried debugging it through F8 key. And I could not believe my eyes. It was going into Function3.


Well after some trial and errors, I changed the function definition of Function3 from Public to Private and guess what??? It workedLaugh | :laugh: . Now the code works fine. Any idea why this was happening? Has anybody seen this before?
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Mike Dimmick8-Aug-07 21:19
Mike Dimmick8-Aug-07 21:19 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Nilesh Hapse8-Aug-07 21:33
Nilesh Hapse8-Aug-07 21:33 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Vasudevan Deepak Kumar17-Aug-07 23:29
Vasudevan Deepak Kumar17-Aug-07 23:29 
JokeRe: Visual Basic 6: Public versus Private Function Pin
Pete O'Hanlon8-Aug-07 21:48
mvePete O'Hanlon8-Aug-07 21:48 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Nilesh Hapse8-Aug-07 23:15
Nilesh Hapse8-Aug-07 23:15 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Pete O'Hanlon8-Aug-07 23:22
mvePete O'Hanlon8-Aug-07 23:22 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Vasudevan Deepak Kumar17-Aug-07 23:30
Vasudevan Deepak Kumar17-Aug-07 23:30 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
dojohansen20-Aug-07 1:13
dojohansen20-Aug-07 1:13 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
NormDroid8-Aug-07 22:50
professionalNormDroid8-Aug-07 22:50 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Nilesh Hapse8-Aug-07 23:17
Nilesh Hapse8-Aug-07 23:17 
AnswerRe: Visual Basic 6: Public versus Private Function Pin
trelliot9-Aug-07 0:11
trelliot9-Aug-07 0:11 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
PIEBALDconsult9-Aug-07 4:26
mvePIEBALDconsult9-Aug-07 4:26 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
Chris Maunder12-Aug-07 1:48
cofounderChris Maunder12-Aug-07 1:48 
GeneralRe: Visual Basic 6: Public versus Private Function Pin
#realJSOP20-Aug-07 10:52
mve#realJSOP20-Aug-07 10:52 
GeneralVS turns up nose at my code... Pin
Shog96-Aug-07 12:35
sitebuilderShog96-Aug-07 12:35 
GeneralRe: VS turns up nose at my code... Pin
TClarke7-Aug-07 4:23
TClarke7-Aug-07 4:23 
GeneralRe: VS turns up nose at my code... Pin
Chris Maunder7-Aug-07 17:00
cofounderChris Maunder7-Aug-07 17:00 

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.