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

Home » Public Forums » archive » logical_true vs nothing in an if statment
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: logical_true vs nothing in an if statment [message #85930 is a reply to message #85927] Wed, 18 September 2013 13:17 Go to previous messageGo to previous message
munka is currently offline  munka
Messages: 36
Registered: December 2009
Member
On Wednesday, September 18, 2013 12:48:36 PM UTC-7, David Fanning wrote:
> 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.")

Too bad it doesn't exist. There could be some interesting discussions :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl: turn string value into variable name part2
Next Topic: Reading large files with restore

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

Current Time: Sat Oct 11 12:36:58 PDT 2025

Total time taken to generate the page: 0.96335 seconds