On 2011-05-05, Roy Smith <[email protected]> wrote:
> In article <[email protected]>,
> Grant Edwards <[email protected]> wrote:
>
>> That's what I was trying to say, but probably not as clearly. The "&"
>> operatore returnas a _value_ that the OP passes _by_value_ to a
>> function. That function then uses the "*" operator to use that value
>> to access some data.
>
> Then, of course, there's references in C++. I think it's fair to call
> the following "call by reference" in the sense we're talking about it
> here.
>
> void f(int& i) {
> i = 5;
> }
> int i = 42;
> f(i);
If after the call to f(i) the caller sees that i == 5, then that's
call by reference. But, we were talking about C.
> Of course, C++ lets you go off the deep end with abominations like
> references to pointers. Come to think of it, C++ let's you go off
> the deep end in so many ways...
:)
--
Grant Edwards grant.b.edwards Yow! Is this sexual
at intercourse yet?? Is it,
gmail.com huh, is it??
--
http://mail.python.org/mailman/listinfo/python-list