Re: Library/Functions to write configuration file for application [message #74743 is a reply to message #74742] |
Mon, 31 January 2011 11:47   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jan 31, 5:44 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> I have some very old routines I wrote for exactly that purpose. They
> worked with text files, recognizing a few comment markers, and
> optionally converting the values to numbers (reals or integers) if
> they are compatible with being numbers. I can tidy them up and publish
> them, maybe later tonight. They fit well into some classes I was
> preparing.
>
> Another approach I used for the same purpose is NetCDF files, which
> nicely handle names dimensions and types, and can be easily put into
> hashes or structures. Writing takes slightly more work, due to the
> need to associate dimensions with the variables, but can also be
> nicely expressed by hashes.
By the way, those formats (text and NetCDF) were chosen for
portability with code in other languages. But if you are using only
IDL, maybe savefiles would be easier. Especially if handled through
Craig Markwardt's cmsvlib (http://www.physics.wisc.edu/~craigm/idl/
cmsave.html), or IDL_Savefile objects.
|
|
|