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

Home » Public Forums » archive » Declaring large vectors in IDL
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: Declaring large vectors in IDL [message #70538 is a reply to message #70493] Tue, 20 April 2010 15:06 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
fgg writes:

> I included 'execute' in the code but it didn't help. When I run the
> procedure the variables are not added to the variables view. For
> instance, if you run this procedure:
>
> pro test
> heads=['a', 'b', 'c']
> data = ['1 2 3', '4 5 6', '7 8 9']
> for i=0,2 do dummy = execute(heads[i]+'=double(strsplit(data[i],",",/
> extract))')
> end
>
> "a", "b", and "c" will not be added to the variables view (with values
> '1 2 3', '4 5 6', and '7 8 9', respectively). Is that what you
> suggested? I replaced the 4th line with:
>
> for i=0,2 do dummy = execute(heads[i]+'= ['+strjoin(strsplit(data[i],/
> extract),', ')+']')
>
> ...and it didn't work either.

I haven't been following much of this discussion, but if you
want these variables defined back at the main IDL level,
you might try using SaveToMain after you create them:

http://www.dfanning.com/programs/savetomain.pro

Of course, they can be saved to other IDL levels if you
want. See the innards of SaveTomMain for insight in
how to do this.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with variable declaration
Next Topic: Rounding off

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

Current Time: Sun Oct 12 14:51:27 PDT 2025

Total time taken to generate the page: 1.12012 seconds