Re: Limit to input when creating a SAVE file? [message #82856] |
Tue, 22 January 2013 13:06 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Tuesday, January 22, 2013 10:17:59 AM UTC-5, rj...@le.ac.uk wrote:
> Rather than just using "save, /all" I know the names of these variables (one of the variables is a list of all the other variable names) so I thought I could use execute to pass this list to the save command
...
> str='save, filename="all_months_data.sav",' +variable_list
> exe=execute(str)
>
> But the SAVE function crashes and it looks like it's because my "variable_list" is too long. Is there a limit on the length of the arguments that can be passed to SAVE?
First of all, make sure that VARIABLE_LIST is really a scalar string, which is a list of comma-separated variable names.
> Is there a nicer way to do this?
The short answer is no. If you want to stick with the stock standard SAVE procedure, then the best you can do is with EXECUTE().
If you want to get clever, you can try my CMSAVE library, which has the capability to save only selected variables and do lots of other things.
http://www.physics.wisc.edu/~craigm/idl/cmsave.html#CMSVLIB
But honestly, using CMSAVE is probably throwing a tank at an anthill.
Craig
|
|
|