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

Home » Public Forums » archive » Logical vs. Bitwise boolean operators
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Logical vs. Bitwise boolean operators [message #29164] Fri, 01 February 2002 08:04
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Fortran has the logical boolean operators .AND., .OR., and .NOT., and I
naively expected the correspondingly named IDL operators to be the same.
However, in IDL, those are bitwise operators, rather than logical ones
(my copy of the manual just calls them 'boolean', without specifying
whether they are logical or bitwise). As a result, the following code
did not do what I expected:

IF (!D.FLAGS AND 8) AND (ratio LE minrat) THEN BEGIN

I can always code around this limitation. The solution I came up with
was to change it to:

IF ((!D.FLAGS AND 8) EQ 8) AND (ratio LE minrat) THEN BEGIN

However, it seems to me that there should be a better way to do this.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: All I get is gray scale (and IDL 5.5)
Next Topic: why the output of PS and Screen arenot the same?

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

Current Time: Sat Oct 11 06:05:32 PDT 2025

Total time taken to generate the page: 0.00680 seconds