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

Home » Public Forums » archive » Converting a string to variable name
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Converting a string to variable name [message #86329] Mon, 28 October 2013 03:17 Go to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello,

I have written the following lines in IDL:

--------------------------------------------------------
week01 = ['2013_04_09', '2013_04_10', '2013_04_11']
w_no=indgen(15)+1
Nw=0
week_no=STRCOMPRESS('week0'+STRING(w_no[Nw]),/REMOVE_ALL)
---------------------------------------------------------

IDL> print,week_no
week01
IDL> help,week_no
WEEK_NO STRING = 'week01'
IDL> print,week01
2013_04_09 2013_04_10 2013_04_11
IDL> help,week01
WEEK01 STRING = Array[3]

I want to call 'week01' array defined above by 'week_no'. Can anyone help me to obtain week_no=week01=[['2013_04_09', '2013_04_10', '2013_04_11']?

Thanks in advance
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mpfitevalexpr not compiled
Next Topic: so long, and thanks for all the fish

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

Current Time: Wed Oct 08 14:08:06 PDT 2025

Total time taken to generate the page: 0.00231 seconds