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

Home » Public Forums » archive » Re: Case statement question
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 question [message #42818 is a reply to message #42817] Wed, 23 February 2005 08:32 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Michael Wallace wrote:
>> case 1 of
>> (x eq 0): do_this()
>> (x ge 1 and x le 9 ): do_that(x)
>> (x eq 10): do_something_else()
>> (x eq 11): do_something_more()
>> else: message, "Error!"
>> endcase
>
>
> Sweet! That works. I would have never thought to switch the logic
> around such that you're sending "true" into the case and looking for the
> case that evaluates to "true." I guess every example I've seen has been
> one where you send in the value you want to find, not the truth value
> you want to find. Wow. Can you tell that I'm easily amused by
> programming logic? Or maybe it's the caffeine talking. ;-)

I think it's the caffiene. :o)

Don't attribute any programming smarts to me - that example is straight out of the docs.

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Singular jacobian in broyden
Next Topic: Putting bands together

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

Current Time: Sat Oct 11 06:35:21 PDT 2025

Total time taken to generate the page: 1.35878 seconds