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

Home » Public Forums » archive » Is it possible to set a string to a veriable name?
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
Is it possible to set a string to a veriable name? [message #67944] Fri, 04 September 2009 04:36
duxiyu@gmail.com is currently offline  duxiyu@gmail.com
Messages: 88
Registered: March 2007
Member
I have an array of string and want to use its elements as veriable
names in a function.
How can I do?

Is there any simple code to replace the ones below?

For example:
STR = ['a', 'b', 'c', 'd', 'e']
for i=0, 4 do begin
case i of
0: data=a
1: data=b
2: data=c
3: data=d
4: data=e
endcase
..............
..............
..............
endfor
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to obtain the process ID of the current IDL process in a platform-independent way?
Next Topic: IDL set_plot

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

Current Time: Wed Oct 08 13:43:29 PDT 2025

Total time taken to generate the page: 0.00468 seconds