On 04/28/2010 10:45 AM, Stephen M. McQuay wrote:
> However, from Wikipedia: "INI files are typically limited to two levels
> (sections and parameters) ...". I want something expressive enough to
> store hashes/arrays. It would appear that INI files are out.
>    

You can store hashes and arrays in ini files. I've done it many times.

An array would look like this:

    my_array = foo, bar, biz, baz

A hash would look like this:

    my_hash = foo => bar, biz => baz

You don't get the benefit of the config file format actually specifying 
those types, but it's definitely possible.

You said this was a configuration file, so I assume it is meant to be 
human readable? If that's the case, then I would do something like the 
foregoing. However, if it's strictly machine readable, then I would 
consider something like sqlite.

--Dave
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to