Re: compile a routine wich inlude a commun [message #47111 is a reply to message #47067] |
Tue, 24 January 2006 13:05   |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
>
> That's what I'm thinking also. There's probably some fundamental design
> issue that prevents it from being a simple thing to do. Sort of like
> passing structure components as arguments and expecting them to be
> writable in the called procedure - the pass-by-reference/value issue
> previosuly mentioned.
The design issue is that since normal variables can't reference
subsets of arrays of other variables, neither can pointer variables,
since they are exactly the same thing.
By the way, IDL always does pass all arguments by reference, it just
happens that if you feed a routine a temporary variable, like a
structure member, or array subset, that variable is freed after the
call... so it only *seems* these are being passed by value. In fact,
modifying such arguments modifies the temporary variable, which is of
course, immediately deleted, and so was quite a useless operation.
JD
|
|
|