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

Home » Public Forums » archive » Re: 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 #5251] Mon, 27 November 1995 00:00
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <49ae2t$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)> .
> IDL> if NOT x and NOT y then print, '4'
> 4
> IDL>

This is an easy one. Case 4 would require the constant "1" to be equal to
NOT x and NOT y.
However the IDL NOT operator is a bitwise negation operator, hence (NOT x) is
equal to 'FFFF'x. (NOT x and NOT y) is also 'FFFF'X, which is -1.

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
[Message index]
 
Read Message
Previous Topic: Blanking out section of contour plot
Next Topic: Please explain...

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

Current Time: Wed Oct 08 19:36:08 PDT 2025

Total time taken to generate the page: 0.00389 seconds