Re: Pass-By-Reference question. [message #38492 is a reply to message #38490] |
Wed, 10 March 2004 19:04   |
timrobishaw
Messages: 16 Registered: June 2003
|
Junior Member |
|
|
Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> wrote
> Mark, are you relying on a documented feature of IDL, or are you just
> assuming that because it works, it's right? I've never assumed that
> keyword inheritance works by overriding explicit values. In fact, I
> would have assumed the exact opposite, namely that the explicit
> overrides the generic.
Craig, the online IDL help document explicitly details this behavior as
a feature of passing by reference.
IDL> ? _REF_EXTRA
>> As to why Tim's example works for XRANGE & YRANGE but not NODATA, I have
>> no idea. Perhaps you are not really doing what you think you are doing.
>
> I agree, the Tim's example is truly strange.
Oh, no, the Tim knows what he's doing. ;-> I'm not going to go into
what brought this up, but as for being strange, I think the example I
provided is perfectly legit: You might want the default state to have
a plot's axes run from -5 to 5 (forget about the specifics, just
imagine that would be the routine's default state.) However, a user
might want to zoom in or out and therefore would like to control the
XRANGE via the keyword inheritance mechanism. Makes sense to me.
Works like a charm. I'd just like to know why it doesn't work for
NODATA and NOERASE.
|
|
|