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

Home » Public Forums » archive » Re: Pass-By-Reference question.
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: Pass-By-Reference question. [message #38484 is a reply to message #38470] Thu, 11 March 2004 04:40 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Timm Weitkamp writes:

> Here's an observation that makes it even stranger: when you change
> "whaddup.pro" so that NODATA is explicitly set to 0 (instead of one)
> inside the routine, and you then try to override that by calling
>
> IDL> whaddup, nodata=1
>
> The amazing thing is that this way it works (i.e., inherited overrides
> explicit keyword).

I discovered this yesterday when I was playing around with
the problem. It reminds me of what happens sometimes when
you incorrectly use KEYWORD_SET instead of N_ELEMENTS to
determine if a keyword is defined or not, and set a
default value. For example, if you use this expression:

IF Keyword_Set(mykeyword) THEN mykeyword = 3

instead of this expression:

IF N_ELements(mykeyword) EQ 0 THEN mykeyword = 3

then it is impossible to set this keyword to 0. I just
haven't been able to come up with a specific mechanism
for this particular situation. But I *have* seen RSI
programmers make this kind of mistake in code, so I think
the theory is plausible.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL online help for v6.0 (sigh)
Next Topic: Re: Pass-By-Reference question. (ARG_PRESENT)

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

Current Time: Mon Dec 01 09:07:15 PST 2025

Total time taken to generate the page: 1.20051 seconds