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

Home » Public Forums » archive » Re: Config files
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: Config files [message #47415 is a reply to message #47414] Thu, 09 February 2006 04:15 Go to previous messageGo to previous message
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
m_schellens@hotmail.com wrote:
> Probably you are better off using
> SAVE and RESTORE.
> It is not in an ascii file then,
> but I could only think of the need if you must
> change the values from outside IDL.

I would use save and restore, but start out with a batch file which can
do the save and restore for you. Something like this:

set_config.pro:

;change these parts:
input = myinputdata.dat
output = myoutputwillgohere.dat
aconstant = 1.0
anarray = [1,2,3]

;leave this alone:
save, input, output, aconstant, anarray, filename='settings.sav'


When you start a run, call @set_config and then later on in the code do
a restore, 'settings.sav'. I do something similar, but save the settings
in a struct rather than loose parameters. That way it's easier to pass
around to any routines that need it later on, and I'm less likely to use
the parameter names for something else by mistake.

Hope that's helpful,

Ben

--
Ben Panter, Garching, Germany.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: help with text widget...
Next Topic: Re: IDLWave documentation generation

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

Current Time: Fri Oct 10 15:00:52 PDT 2025

Total time taken to generate the page: 0.56203 seconds