Re: object argument passing behaviour changed in v8.2.2? [message #86274 is a reply to message #86272] |
Tue, 22 October 2013 09:59   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
On 10/22/2013 11:57 AM, Chris Torrence wrote:
>
> Hi Paul,
> I don't think this is a special case. It's also not
> "semi-passed-by-reference." The code is simply passing an expression
> into a routine, so IDL cannot store into it.
> Cheers, Chris
Well, that's not the case. Both your, and my corrected, test cases shows
that you *can* store into the array element reference (well, the object
that was referenced in that array element) in the callee.
It was the "redefinition" of the object in the routine (or method) that
was screwing things up.
I know it won't (can't) change anytime soon, but I find the fact that an
array element reference is considered an expression in IDL very
confusing. It just doesn't grok well.
IDL users should be shielded from under-the-hood details like argument
passing mechanisms, IMO (that's my Fortran90/95/2003 side talking).
cheers,
paulv
|
|
|