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

Home » Public Forums » archive » Creating Variables in Programs
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: Creating Variables in Programs [message #12301 is a reply to message #12195] Tue, 14 July 1998 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Riemar Bauer (r.bauer@fz-juelich.de) writes:

> An other way to get an undefined
> variabel is b=n_elements(a)
> Yes b is well defined by 0 but a is defined as undefined.
>
> help
> % At $MAIN$
> B LONG = 0
> A UNDEFINED = <Undefined>

Uh, this *only* happens if A is undefined to start with
and is perfectly normal behavior. In fact, it is the only
way to know if keywords are undefined in an IDL procedure or
function:

IF N_Elements(keyword) EQ 0 THEN keyword = 5

This construction NEVER makes A undefined (or there is
something seriously wrong with your version of IDL):

A = 5
B = N_Elements(A)
HELP, A, B

A INT = 5
B LONG = 1

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Printing problems under Object Graphics ...
Next Topic: integer to float?

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

Current Time: Wed Oct 08 15:27:26 PDT 2025

Total time taken to generate the page: 0.00441 seconds