Click here to Skip to main content
12,446,525 members (56,548 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, 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: Pass by value and pass by reference Pin
darkelv17-Jul-08 20:08
memberdarkelv17-Jul-08 20:08 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad18-Jul-08 2:55
memberPaul Conrad18-Jul-08 2:55 
GeneralRe: Pass by value and pass by reference Pin
V.17-Jul-08 22:17
memberV.17-Jul-08 22:17 
GeneralRe: Pass by value and pass by reference Pin
CPallini17-Jul-08 23:09
mvpCPallini17-Jul-08 23: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 9:12
memberJoe Woodbury19-Jul-08 9:12 
GeneralRe: Pass by value and pass by reference Pin
CPallini20-Jul-08 3:56
mvpCPallini20-Jul-08 3:56 
GeneralRe: Pass by value and pass by reference Pin
Joe Woodbury19-Jul-08 9:07
memberJoe Woodbury19-Jul-08 9:07 
GeneralRe: Pass by value and pass by reference Pin
KarstenK21-Jul-08 2:42
memberKarstenK21-Jul-08 2:42 
AnswerRe: Pass by value and pass by reference Pin
Mitendra Anand21-Jul-08 20:58
memberMitendra Anand21-Jul-08 20:58 
GeneralRe: Pass by value and pass by reference Pin
jon_17523-Jul-08 12:00
memberjon_17523-Jul-08 12: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.


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 25 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid