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

Home » Public Forums » archive » Re: CASE statement
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: CASE statement [message #26540 is a reply to message #26539] Fri, 07 September 2001 18:44 Go to previous messageGo to previous message
gmccabe14 is currently offline  gmccabe14
Messages: 3
Registered: September 2001
Junior Member
hi,

"the square root of 3 is 2, for big enough values of 3."

i like case 1 of. my thanks to the users for another creative solution.

george
george.mccabe@gsfc.nasa.gov


Brian Jackel <bjackel@phys.ucalgary.ca> wrote in message news:<3B993F0F.8DBF705A@phys.ucalgary.ca>...
> Well, you could try this:
>
> CASE (1) OF
> (this OR that): x=1
> (something AND somethingelse): x=2
> (NOT theotherthing): x=3
> ELSE:MESSAGE,'Error- no match found for case statement'
> ENDCASE
>
> Kinda ugly, but gets the job done.
>
> Brian
>
> K Banerjee wrote:
>>
>> In IDL, is it possible to use mulitple expressions with a single
>> statement?
>>
>> Something like:
>>
>> PRO CASE1, Tag
>>
>> case Tag of
>>
>> ;; The following line does not work.
>> ('TIFF') or ('tiff'): begin
>> print, "TAG is TIFF"
>> end
>>
>> else: begin
>> print, "TAG is UNKNOWN"
>> end
>>
>> endcase
[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
Read Message
Previous Topic: Drawing 2 or 3 contours on a same image
Next Topic: Using IDL with Java

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

Current Time: Thu Oct 09 07:22:11 PDT 2025

Total time taken to generate the page: 1.76117 seconds