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

Home » Public Forums » archive » Re: Bug in SWITCH - ELSE: 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: Bug in SWITCH - ELSE: statement? [message #56306 is a reply to message #56232] Thu, 11 October 2007 09:47 Go to previous messageGo to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"Paul van Delst" <Paul.vanDelst@noaa.gov> wrote in message
news:feliu2$p9t$1@news.nems.noaa.gov...
...
> Goodness.... I never even thought of that. Why on Earth should the order
> of the case selectors matter in a CASE construct? I just wrote:
>
> pro test_case, number
> case number of
> else: print, 'I do not like this number!'
> 1: print, '1 is a good number'
> 2: print, '2 is even better'
> 3: print, '3 is weird looking'
> endcase
> end


That seems exactly like it should behave to me.
It executes the first match "else' and jumps out.

I figure the code above is something like

pro myjunk
print,'hi'
return
print, 'never executed'
end


Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: structure into strcuture
Next Topic: How to make an attribute of the oject visible outside of the class

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

Current Time: Wed Oct 08 19:34:27 PDT 2025

Total time taken to generate the page: 0.00420 seconds