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

Home » Public Forums » archive » Re: type conversion error - help needed urgent
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: type conversion error - help needed urgent [message #84464 is a reply to message #84463] Mon, 27 May 2013 01:02 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Måndagen den 27:e maj 2013 kl. 06:50:45 UTC+2 skrev sid:
>
> But still the problem is not solved since varstr is equal to jplm10(34) which is a string , so I am not getting value of jplm10(34)

Your program might be faster and easier to read if you had a 2D array, so instead if jplmN(M), you could use jplm(N,M). But if you want to continue with the idea of constructing the variable name as a string, I think you want the execute command:

IDL> a=findgen(10)
IDL> void=execute('c=a(8)')
IDL> print,c
8.00000

Or in your case,

IDL> void='whatever=varstr'

http://www.exelisvis.com/docs/EXECUTE.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: on the background color of cgplot
Next Topic: Re: contour discontinuity

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

Current Time: Wed Oct 08 19:33:57 PDT 2025

Total time taken to generate the page: 0.00400 seconds