[fpc-pascal]Unit to read/parse configuration file

Olaf Leidinger leidola at newcon.de
Fri May 16 20:15:28 CEST 2003

Am Fre, 2003-05-16 um 15.32 schrieb Alan Mead:
> One more question:  My data analysis program needs to parse a
> "command file" to set options, identify variables, determine which
> statistics to compute, etc.  
> I combed the web looking for a GPL'd or BSD'd unit (or code) that
> does this.  I found one simple unit CFG_DEF, a unit for reading INI
> files, and numerous (unusable) Turbo Pascal compiled units.  The
> config code in ptop is closer to what I'm looking for.  
> I'd like a richer set of syntax features than just 'key=value' and if
> someone else has already invented this wheel, I'd would rather use
> that syntax.  Something like the following:
> foo = bar
> foo2 = bar1,bar2,bar3
> foo3
> foo4 -iterations 1 -nostall
> Any ideas?  

You could use xml files. I think there is an interface to libxml somewhere around, isn't it?

Olaf Leidinger

More information about the fpc-pascal mailing list