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

Home » Public Forums » archive » 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
CASE statments [message #4478] Tue, 20 June 1995 00:00
wart is currently offline  wart
Messages: 8
Registered: March 1995
Junior Member
I've got a simple question about using case statements in IDL:

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

grn_text: BEGIN
; do lots of stuff here
END

blu_text: BEGIN
; do lots of stuff here
END

ENDCASE

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;

change the above to become something like:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;

CASE event.id OF

red_text: grn_text: blu_text: BEGIN
; do lots of stuff here
END
ENDCASE

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;

The 'do lots of stuff' is the same for each case. C lets you do this
just as I've shown in the second case. Will IDL let you do this as
well?

--Wart
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: linking with call_external
Next Topic: IDL FAQ B

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

Current Time: Fri Oct 10 14:59:53 PDT 2025

Total time taken to generate the page: 1.91995 seconds