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

Home » Public Forums » archive » Please explain...
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: Please explain... [message #5400 is a reply to message #5253] Mon, 27 November 1995 00:00 Go to previous message
jlaw is currently offline  jlaw
Messages: 11
Registered: November 1995
Junior Member
In article 2gt@hammer.msfc.nasa.gov, mallozzi@ssl.msfc.nasa.gov writes:
> Can someone explain this to me?
>
> IDL> .r
> - x = 0 & y = 0
> - case 1 of
> - x and y: print, '1'
> - NOT x and y: print, '2'
> - x and NOT y: print, '3'
> - NOT x and NOT y: print, '4'
> - endcase
> - end
> % Compiled module: $MAIN$.
> % Case statement found no matches.
> % Execution halted at $MAIN$ </dev/tty( 1)> .

Well, I am getting
: x = 0
: print, NOT x
-1
: y = 0
: print, NOT x AND NOT y
-1

So your CASE does not evaluate to 1 here. < time out to look at online help >
The 'problem' is the implementation of Boolean types in IDL : It is done
bitwise, and even integers are true.. In fact there are no special
"TRUE" and "FALSE" values. Perhaps its best here to use an ELSE: label.
Are you sure all your booleans will always be 0 or 1?

f.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Please explain...
Next Topic: Looking for a search routine

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

Current Time: Wed Oct 08 19:35:54 PDT 2025

Total time taken to generate the page: 0.00284 seconds