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 #42833 is a reply to message #42832] Tue, 22 February 2005 15:50 Go to previous messageGo to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> 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. ;-)

-Mike
[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 25 04:15:19 PDT 2025

Total time taken to generate the page: 3.27921 seconds