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 #42431 is a reply to message #36256] Fri, 04 February 2005 08:26 Go to previous messageGo to previous message
eddie haskell is currently offline  eddie haskell
Messages: 29
Registered: September 1998
Junior Member
>> 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

Unless you have your heart really set on using the CASE you could use a
SWITCH instead of a CASE.
Example:

SWITCH str OF
'a' : BEGIN
print,'joy!'
BREAK
END
'b' :
'c' : BEGIN
print, 'ouch!'
BREAK
END
ELSE : print, '??'
ENDSWITCH

Cheers,
eddie
[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 11:37:44 PDT 2025

Total time taken to generate the page: 0.00250 seconds