Click here to Skip to main content
11,415,973 members (84,827 online)

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, embarrasing 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: Pass by value and pass by reference Pin
CIDev3-Sep-08 3:44
memberCIDev3-Sep-08 3:44 
GeneralRe: Pass by value and pass by reference Pin
Pete O'Hanlon17-Jul-08 10:25
mvpPete O'Hanlon17-Jul-08 10:25 
JokeRe: Pass by value and pass by reference Pin
Big Daddy Farang17-Jul-08 11:03
memberBig Daddy Farang17-Jul-08 11:03 
GeneralRe: Pass by value and pass by reference Pin
Chris Meech17-Jul-08 12:43
memberChris Meech17-Jul-08 12:43 
GeneralRe: Pass by value and pass by reference Pin
Big Daddy Farang17-Jul-08 12:50
memberBig Daddy Farang17-Jul-08 12:50 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad17-Jul-08 17:24
memberPaul Conrad17-Jul-08 17:24 
JokeRe: Pass by value and pass by reference Pin
Sherin Iranimose17-Jul-08 19:28
memberSherin Iranimose17-Jul-08 19:28 
GeneralRe: Pass by value and pass by reference Pin
Jahmani22-Jul-08 0:04
memberJahmani22-Jul-08 0:04 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad17-Jul-08 17:23
memberPaul Conrad17-Jul-08 17:23 
GeneralRe: Pass by value and pass by reference Pin
Sherin Iranimose17-Jul-08 19:23
memberSherin Iranimose17-Jul-08 19:23 
GeneralRe: Pass by value and pass by reference Pin
darkelv17-Jul-08 21:08
memberdarkelv17-Jul-08 21:08 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad18-Jul-08 3:55
memberPaul Conrad18-Jul-08 3:55 
GeneralRe: Pass by value and pass by reference Pin
V.17-Jul-08 23:17
memberV.17-Jul-08 23:17 
GeneralRe: Pass by value and pass by reference Pin
CPallini18-Jul-08 0:09
mvpCPallini18-Jul-08 0:09 
V. wrote:
objects (including strings) are passed by reference to my knowledge


Nope. All parameters are passed by value. you should use the ref keyword to pass a parameter by reference. BTW: passing by value an object implies that called function can actually change object's internal state.
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: Pass by value and pass by reference Pin
Joe Woodbury19-Jul-08 10:12
memberJoe Woodbury19-Jul-08 10:12 
GeneralRe: Pass by value and pass by reference Pin
CPallini20-Jul-08 4:56
mvpCPallini20-Jul-08 4:56 
GeneralRe: Pass by value and pass by reference Pin
Joe Woodbury19-Jul-08 10:07
memberJoe Woodbury19-Jul-08 10:07 
GeneralRe: Pass by value and pass by reference Pin
KarstenK21-Jul-08 3:42
memberKarstenK21-Jul-08 3:42 
AnswerRe: Pass by value and pass by reference Pin
Mitendra Anand21-Jul-08 21:58
memberMitendra Anand21-Jul-08 21:58 
GeneralRe: Pass by value and pass by reference Pin
jon_17523-Jul-08 13:00
memberjon_17523-Jul-08 13:00 
GeneralRe: Pass by value and pass by reference Pin
Mitendra Anand23-Jul-08 22:01
memberMitendra Anand23-Jul-08 22:01 
GeneralPadding an ID to six digits Pin
ClementsDan14-Jul-08 16:57
memberClementsDan14-Jul-08 16:57 
GeneralRe: Padding an ID to six digits Pin
_Damian S_14-Jul-08 18:01
member_Damian S_14-Jul-08 18:01 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult15-Jul-08 5:31
memberPIEBALDconsult15-Jul-08 5:31 
GeneralRe: Padding an ID to six digits Pin
Stephen Hewitt14-Jul-08 18:53
mvpStephen Hewitt14-Jul-08 18:53 
GeneralRe: Padding an ID to six digits Pin
leppie14-Jul-08 22:26
memberleppie14-Jul-08 22:26 
GeneralRe: Padding an ID to six digits Pin
ClementsDan19-Jul-08 18:49
memberClementsDan19-Jul-08 18:49 
GeneralRe: Padding an ID to six digits Pin
geoffs14-Jul-08 21:50
membergeoffs14-Jul-08 21:50 
GeneralRe: Padding an ID to six digits Pin
BadKarma14-Jul-08 22:41
memberBadKarma14-Jul-08 22:41 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult15-Jul-08 5:39
memberPIEBALDconsult15-Jul-08 5:39 
GeneralRe: Padding an ID to six digits Pin
Ri Qen-Sin17-Jul-08 4:42
memberRi Qen-Sin17-Jul-08 4:42 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult17-Jul-08 9:38
memberPIEBALDconsult17-Jul-08 9:38 
GeneralRe: Padding an ID to six digits Pin
Paul Conrad16-Jul-08 10:15
memberPaul Conrad16-Jul-08 10:15 
GeneralRe: Padding an ID to six digits Pin
supercat918-Jul-08 6:30
membersupercat918-Jul-08 6:30 
GeneralRe: Padding an ID to six digits Pin
dybs16-Aug-08 19:18
memberdybs16-Aug-08 19:18 
General// Enforce Method Contract Pin
Josh Smith13-Jul-08 15:05
mvpJosh Smith13-Jul-08 15:05 
GeneralRe: // Enforce Method Contract Pin
DownUnderDev13-Jul-08 15:40
memberDownUnderDev13-Jul-08 15:40 
GeneralRe: // Enforce Method Contract Pin
CPallini13-Jul-08 22:10
mvpCPallini13-Jul-08 22:10 
GeneralRe: // Enforce Method Contract Pin
Simon Capewell15-Jul-08 3:16
memberSimon Capewell15-Jul-08 3:16 
GeneralRe: // Enforce Method Contract Pin
CIDev2-Sep-08 12:48
memberCIDev2-Sep-08 12:48 
GeneralRe: // Enforce Method Contract Pin
Paul Conrad14-Jul-08 8:03
memberPaul Conrad14-Jul-08 8:03 
GeneralRe: // Enforce Method Contract Pin
Pete O'Hanlon14-Jul-08 10:07
mvpPete O'Hanlon14-Jul-08 10:07 
GeneralRe: // Enforce Method Contract Pin
Josh Smith14-Jul-08 10:28
mvpJosh Smith14-Jul-08 10:28 
GeneralRe: // Enforce Method Contract Pin
Stephen Hewitt14-Jul-08 22:31
mvpStephen Hewitt14-Jul-08 22:31 
GeneralRe: // Enforce Method Contract Pin
David Kentley15-Jul-08 7:19
memberDavid Kentley15-Jul-08 7:19 
GeneralBoolean Variable Name Pin
Daniel Kanev11-Jul-08 5:19
memberDaniel Kanev11-Jul-08 5:19 
GeneralRe: Boolean Variable Name Pin
Rage11-Jul-08 5:57
memberRage11-Jul-08 5:57 
GeneralRe: Boolean Variable Name Pin
Daniel Kanev11-Jul-08 6:42
memberDaniel Kanev11-Jul-08 6:42 
GeneralRe: Boolean Variable Name Pin
williamnw13-Jul-08 23:10
memberwilliamnw13-Jul-08 23:10 
GeneralRe: Boolean Variable Name Pin
Philippe Lhoste11-Jul-08 12:10
memberPhilippe Lhoste11-Jul-08 12:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150427.4 | Last Updated 28 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid