[Q] if-else statement [message #11707] |
Tue, 05 May 1998 00:00 |
jyli
Messages: 21 Registered: November 1995
|
Junior Member |
|
|
Hi,
In FORTRAN, there is no problem to do:
IF(test1) THEN
...
ELSEIF(test2) THEN
...
ELSEIF(test3) THEN
...
ELSEIF(test4) THEN
...
ENDIF
Of course one can replace this with the CASE statement, but it is
really clumsy in my particular situation.
As far as I know one can only perform two condition tests (test1 and
NOT test1) in IDL at one time using IF-ELSE:
IF(test1) THEN BEGIN
...
ENDIF ELSE
...
ENDELSE
[Question] How do you do multiple IF-ELSE tests in IDL?
thanks in advance
--
============================================================ ============
Jason Y. Li | Tel : (301) 286-1029
Code 913 | Fax : (301) 286-1759
NASA Goddard Space Flight Center | www : http://climate.gsfc.nasa.gov
Greenbelt, MD 20771, USA | email: jyli@climate.gsfc.nasa.gov
============================================================ ============
Beauty of style, harmony, grace and good rhythm depend on simplicity.
|
|
|