comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Weird MIN behavior
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Weird MIN behavior [message #42741 is a reply to message #42720] Sun, 20 February 2005 17:56 Go to previous messageGo to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
>> In every other language, arrays and array elements are
>> passed by reference and primitives are passed by value.
>
>
> Really!? Yet one more reason to put off learning C++. :-)

Yes. Really. In C/C++, primitives are sent by value. If you need to
modify the value from within the function, you have to send the
reference to the variable instead. Arrays are automatically passed by
reference. In fact, it's possible to work with an array just like it's
a contiguous series of references.

Java is similar, except all primitive variables are passed by value.
Always. There's no way around this. All objects (including arrays) are
sent by reference.

Other languages, except IDL, have similar ideas when it comes to pass by
reference and value.

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: widget_base alignment question
Next Topic: Maximze a minimize GUI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 11:50:33 PDT 2025

Total time taken to generate the page: 0.16625 seconds