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

Home » Public Forums » archive » A simple IF statement question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
A simple IF statement question [message #42513] Mon, 14 February 2005 05:55 Go to previous message
andry_william is currently offline  andry_william
Messages: 3
Registered: December 2004
Junior Member
Dear IDL user,

I am using IDL 6.1 on Linux SUSE. I am writing a simple code using the
IF statement and am wondering about the following result:

IDL> IF 1 THEN PRINT, '1' ELSE PRINT, 'None'
1
IDL> IF 2 THEN PRINT, '2' ELSE PRINT, 'None'
None
IDL> IF 19 THEN PRINT, '19' ELSE PRINT, 'None'
19
IDL> IF 24 THEN PRINT, '24' ELSE PRINT, 'None'
None
IDL> IF 0 THEN PRINT, '0' ELSE PRINT, 'None'
None

Am I wrong when I expect the IF statement to return always TRUE if the
condition is not 0 (I mean something like 1,2,3,4,....)?

Thanks for any comments.

Andry
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: test
Next Topic: strange things in CONTOUR

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

Current Time: Fri Oct 10 22:19:50 PDT 2025

Total time taken to generate the page: 1.03785 seconds