Click here to Skip to main content

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 Pinmemberdarkelv17-Jul-08 21:08 
GeneralRe: Pass by value and pass by reference PinmemberPaul Conrad18-Jul-08 3:55 
GeneralRe: Pass by value and pass by reference PinmemberV.17-Jul-08 23:17 
GeneralRe: Pass by value and pass by reference PinmvpCPallini18-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 PinmemberJoe Woodbury19-Jul-08 10:12 
GeneralRe: Pass by value and pass by reference PinmvpCPallini20-Jul-08 4:56 
GeneralRe: Pass by value and pass by reference PinmemberJoe Woodbury19-Jul-08 10:07 
GeneralRe: Pass by value and pass by reference PinmemberKarstenK21-Jul-08 3:42 
AnswerRe: Pass by value and pass by reference PinmemberMitendra Anand21-Jul-08 21:58 
GeneralRe: Pass by value and pass by reference Pinmemberjon_17523-Jul-08 13:00 

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
Web01 | 2.8.141223.1 | Last Updated 26 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid