Re: logical_true vs nothing in an if statment [message #85927 is a reply to message #85926] |
Wed, 18 September 2013 12:48   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mynameismunka@gmail.com writes:
>
> Why is the behavior of the 'if' statement in idl like this? I was under the impression putting nothing there is equivalent to the logical_true() statment???!
>
>
>
> IDL> for i=0,10 do if i then print,'true' else print,'false'
> false
> true
> false
> true
> false
> true
> false
> true
> false
> true
> false
> IDL> for i=0,10 do if logical_true(i) then print,'true' else print,'false'
> false
> true
> true
> true
> true
> true
> true
> true
> true
> true
> true
Why? I think you have the wrong newsgroup. You want
comp.lang.metaphysical. ;-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|