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 #26530 is a reply to message #26529] Mon, 10 September 2001 04:45 Go to previous messageGo to previous message
Martin Downing is currently offline  Martin Downing
Messages: 136
Registered: September 1998
Senior Member
>>> 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
[snip]
> Well, not that I've ever used it myself, but I have seen another nifty
form,
> something like this:
>
> case 1 of
> (tag eq 'TIFF') or $
> (tag eq 'TAFF') or $
> (tag eq 'FIFF') : begin & print,"Tag is TIFF (or a typo thereof)" & end
>
[snip]
>
> Whether this is a "proper form", I'll leave up to David :-)
>

It seems to me you all have a SWITCH-phobia :-)
have i missed something or shouldnt we just be writing:

SWITCH tag of
"TIFF":
"TAFF": BEGIN
print, "tagged image format"
BREAK
END
ELSE: print, "unknown format"
ENDSWITCH

Also, please dont encorage RSI to produce a !TRUE constant, as I and other
C/C++ users have trouble not reading this as "NOT TRUE". I guess it would be
OK to have !VALUES.TRUE though.

cheers
Martin

----------------------------------------
Martin Downing,
Clinical Research Physicist,
Orthopaedic RSA Research Centre,
Woodend Hospital, Aberdeen, AB15 6LS.
[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: Wed Oct 08 19:20:16 PDT 2025

Total time taken to generate the page: 0.00480 seconds