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

Home » Public Forums » archive » Re: translating an array name to a string
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: translating an array name to a string [message #22139 is a reply to message #22133] Thu, 19 October 2000 00:00 Go to previous messageGo to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Craig Markwardt wrote:
>
> Craig Markwardt <craigmnet@cow.physics.wisc.edu> writes:
>> Second, your check to see if a variable is undefined is rather
>> convoluted. It involves two passes to get it right. I prefer instead
>> to use the N_ELEMENTS command to immediately determine whether a
>> variable is undefined. Unlike *assigning* an undefined variable,
>> which does produce an error, simply taking the N_ELEMENTS of an
>> undefined variable will not cause an error.
>
> Ooops, this is actually a mistake on my part, at least on versions of
> IDL earlier than v5.3.
>
> ROUTINE_NAMES(NAME, FETCH=1) will
>
> * succeed if a variable exists and is defined
> * return an undefined value if the variable exists but is undefined
> * utterly fail if the variable doesn't exist, stopping execution

That's not the behavior I see in 5.3. I get the 2nd behavior for both
of the latter two cases, and your first code version works as
advertised. (I like it better too.)

JD


--
J.D. Smith | WORK: (607) 255-6263
Cornell Dept. of Astronomy | (607) 255-5842
304 Space Sciences Bldg. | FAX: (607) 255-5875
Ithaca, NY 14853 |
[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
Previous Topic: Drive detection on win
Next Topic: Re: ShapeFile

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

Current Time: Fri Oct 10 12:07:56 PDT 2025

Total time taken to generate the page: 0.24039 seconds