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

Home » Public Forums » archive » code snippet
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
code snippet [message #25297] Tue, 29 May 2001 11:17
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
Hi everyone,

i just ran across this in an IDL (its inside 'map_continents.pro')
procedure, and thought its behaviour was pretty neat. Maybe you all know
this already, but hopefully not, and hopefully someone will find it
useful. here goes:

IDL> key = 2
IDL> ;;; set 'key' to 0 or 1 or 2 or ...
IDL> possibilities = ['first','second','third','fourth']
IDL> choice = (possibilities)[key]
IDL> help, choice
CHOICE STRING = 'third'
IDL>

-k.

--
Ken Mankoff
LASP://303.492.3264
http://lasp.colorado.edu/~mankoff/
[Message index]
 
Read Message
Previous Topic: Re: subscripts and superscripts in plot labels and titles ?
Next Topic: Re: more IDL falls asleep

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

Current Time: Wed Oct 08 11:14:03 PDT 2025

Total time taken to generate the page: 0.00377 seconds