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

Home » Public Forums » archive » 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
Config files [message #47417] Thu, 09 February 2006 02:58
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
I'd like to shift my rather clunky code with too many hardcoded
constants over to using some sort of configuration file, ideally
something in a sensible ASCII format. I'd want to pass my code the
filename, and then it could read the file and pair things up in a
structure, so I might have a file like

input = myinputdata.dat
output = myoutputwillgohere.dat
aconstant = 1.0
anarray = [1,2,3]

and read it with something like
foo=readconfig('configdata.txt')
and get a datastructure from it like
foo.input='myinputdata.dat'
foo.aconstant=1.0 etc...

Shirley I don't need to reinvent the wheel? Anything functionally
vaguely similar would be very handy.

--
Edd
[Message index]
 
Read Message
Previous Topic: projection info (.prj file) from ESRI Shape
Next Topic: passing function name as a parameter in IDL procedure/function

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

Current Time: Fri Oct 10 02:18:43 PDT 2025

Total time taken to generate the page: 0.88133 seconds