Re: Passing zero as a Parameter/ NOT KEYWORD_SET [message #16040] |
Wed, 30 June 1999 00:00  |
J.D. Smith
Messages: 214 Registered: August 1996
|
Senior Member |
|
|
"R.Bauer" wrote:
>
> Martin Schultz wrote:
>
>> Martin Schultz wrote
>>
>> and D. Fanning, R. Bauer and J.D. Smith replied
>>
>> [...]
>>
>> oh well! Just when I for once thought I knew IDL ;-(
>> (1) I confess: I confused IF with KEYWORD_SET. It is still sometimes
>> enstranging that
>> IF (2) THEN PRINT,'TRUE'
>> will not print anything...
>
> Did you know that's
>
> if (3) then print,'true'
>
> will print 'true'
>
> All odd number gives true.
>
For non-floating numbers, only the least significant bit is examined.
Note that if (-1) also gives true. For floating numbers, only 0.0 is
false.
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
|
|
|