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 #93973 is a reply to message #93972] Sat, 10 December 2016 01:21 Go to previous messageGo to previous message
Nikola is currently offline  Nikola
Messages: 53
Registered: November 2009
Member
On Saturday, December 10, 2016 at 4:31:04 AM UTC, Michael Galloy wrote:
> 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)

Many thanks for the reply, Michael. It's the first time I'm using any of the scope functions. They seem to be my new favorites of IDL.
[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: Wed Oct 08 15:23:02 PDT 2025

Total time taken to generate the page: 0.00373 seconds