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 #26529] Mon, 10 September 2001 04:54 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Martin Downing 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
> [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 :-)

No I am not I just waiting.
But I am missing strupcase(tag) ...


cheers

Reimar

> 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.

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
[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 15:34:56 PDT 2025

Total time taken to generate the page: 0.00423 seconds