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

Home » Public Forums » archive » RESTORE-like function using H5
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: RESTORE-like function using H5 [message #93972 is a reply to message #93970] Fri, 09 December 2016 20:30 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 12/9/16 4:47 PM, Nikola Vitas wrote:
> I made save- and restore-like functions using H5 instead of the xdr
> format. To resolve input variable names in saveh5, I used
> SCOPE_VARNAMES and that works fine. On the other hand, my restoreh5
> is a function returning a structure. Just for curiosity, what is the
> trick with the native RESTORE procedure? How does it make the loaded
> variables available in memory after the execution? It behaves like a
> batch file that takes some input (filename, keywords) or as a
> procedure with a silent STOP before the END.
>

You can use SCOPE_VARFETCH on the restore side to insert a variable into
a particular variable name in a particular scope. You can do something
like the following on the command line:

IDL> (scope_varfetch('data', /enter, level=1)) = findgen(10)
IDL> help, data
DATA FLOAT = Array[10]

You'll just have to set LEVEL correctly, check out the docs.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: function graphics max window size
Next Topic: Partial Differential Equation

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

Current Time: Fri Oct 10 01:47:41 PDT 2025

Total time taken to generate the page: 1.44349 seconds