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

Home » Public Forums » archive » Case for XML (Was: convert very large string to numeric)
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 [message #42436 is a reply to message #36256] Fri, 04 February 2005 03:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Lopez Pons writes:

> I want to write this with CASE:
>
> CASE str OF
> 'a': print,'joy!'
> 'b' OR 'c': print,'ouch!'
> ELSE: print, '??'
> ENDCASE
>
> obviously this syntax doesn't works

I would try something like this:

CASE 1 OF
(str EQ 'a'): Print, 'joy'
(str EQ 'b') OR (str EQ 'c'): Print, 'ouch!'
ELSE: Print, '??'
ENDCASE

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Object Graphics plot problem
Next Topic: Array extraction, multiple slices from paired values

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

Current Time: Fri Oct 10 14:00:10 PDT 2025

Total time taken to generate the page: 0.09525 seconds