[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking if variable is defined



Dominik (dpaul@ukl.uni-freiburg.de) writes:

> 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...

  IF N_Elements(variable_name) NE 0 THEN doSomething

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155