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

Home » Public Forums » archive » checking if variable is defined
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: checking if variable is defined [message #24759 is a reply to message #24625] Thu, 12 April 2001 05:19 Go to previous messageGo to previous message
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
Dominik wrote:
>
> Helle there,
>
> I would like to plot a variable, but only if it is existing. When the
> Variable is undefined, nothing should happen. So I am searching for an
> expression for the if statement. Does anybody know an expression like:
> if ( vaiable_name existing) then...


One way to do this is with the N_ELEMENTS() function:

if (n_elements( variable ) GT 0) then print,'Variable exists'

--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDLWAVE 4.9
Next Topic: Re: R: How to call fortran subroution?

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

Current Time: Wed Oct 08 17:24:49 PDT 2025

Total time taken to generate the page: 0.00479 seconds