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

Home » Public Forums » archive » Evaluating a variable
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: Evaluating a variable [message #37815 is a reply to message #37726] Fri, 23 January 2004 01:24 Go to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
> All I want to do is evaluate a string variable to read the value of the
> variable that it evaluates to (say that three times quickly) Thanks in
> advance,
> Richard

Hi,

I think what you want is what David suggests, but if you really want to
evaluate a string and use the variable named therein...

array1=[1,4,3,5.3,42,234,32,..(etc)]
array2=[1,6,4.65]
array3=[9.1,4,2.02,5,6]
arrays=['array1','array2','array3']
for i=0, 2 do begin
string="thisarray = ", arrays[i]
test=execute(string)
;you should check test for success and do something with it.
routine_dostuff, thisarray
endfor

Chris.
[Message index]
 
Read Message
Read Message
Previous Topic: Limiting the number of VM instances
Next Topic: Re: Evaluating a variable

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

Current Time: Sun Oct 12 05:32:00 PDT 2025

Total time taken to generate the page: 0.72243 seconds