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

Home » Public Forums » archive » Re: CASE statments
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: CASE statments [message #4470] Wed, 21 June 1995 00:00
wart is currently offline  wart
Messages: 8
Registered: March 1995
Junior Member
In article <3s7m2p$i5v@hacgate2.hac.com>,
Mike Schienle <rep2857@sbsun0010.sbrc.hac.com> wrote:
> Cc'd to wart@dice.ugcs.caltech.edu
>
> Yup. Here you go:
>
> Case 1 of
> (Event.id eq red_text or $
> Event.id eq grn_text or $
> Event.id eq blu_text): begin
> ; stuff
> end
> Endcase
>
> The "1" in the opening case line acts as a "true". The first statement
> that evaluates to true/1 will be run.

Thank you much! that works great.

--Wart
Re: CASE statments [message #4477 is a reply to message #4470] Tue, 20 June 1995 00:00 Go to previous message
rep2857 is currently offline  rep2857
Messages: 28
Registered: December 1994
Junior Member
Cc'd to wart@dice.ugcs.caltech.edu

In article <3s7iea$t60@gap.cco.caltech.edu>,
Wart <wart@dice.ugcs.caltech.edu> wrote:
> Is there any way to associate more than one tag with a set of
> instructions: Something like
>
> CASE event.id OF
>
> red_text: BEGIN
> ; do lots of stuff here
> END
...
> CASE event.id OF
>
> red_text: grn_text: blu_text: BEGIN
> ; do lots of stuff here
> END
> ENDCASE

Yup. Here you go:

Case 1 of
(Event.id eq red_text or $
Event.id eq grn_text or $
Event.id eq blu_text): begin
; stuff
end
Endcase

The "1" in the opening case line acts as a "true". The first statement
that evaluates to true/1 will be run.

Mike Schienle Hughes Santa Barbara Research Center
Home: mgs@seldon.terminus.com Coromar Drive, M/S B28/87
Work: rep2857@sbsun0010.sbrc.hac.com Goleta, CA 93117
Contract Employee. Will visualize data for large amounts of money.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: routines to map raw weather obvervations?
Next Topic: NCAR GBYTES/SBYTES equivalent in IDL?

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

Current Time: Wed Oct 08 17:47:46 PDT 2025

Total time taken to generate the page: 0.00547 seconds