From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-29 11:59:58 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed Date: 29 May 2002 11:59:57 -0700 Organization: http://groups.google.com/ Message-ID: <4519e058.0205291059.737616ec@posting.google.com> References: NNTP-Posting-Host: 66.109.83.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1022698798 22425 127.0.0.1 (29 May 2002 18:59:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 May 2002 18:59:58 GMT Xref: archiver1.google.com comp.lang.ada:24955 Date: 2002-05-29T18:59:58+00:00 List-Id: "Marin David Condic" wrote in message news:... > narrowed down to the needs of an INI file. With a Map, you've got everything > you need to store & query attribute/value pairs, eh? (Editing by hand might If you were to use a Grace-style map, I think you'd have to view every value as a string (most likely, an Ada.Strings.Unbounded_String). His example showed numbers, which presumably folks would want to manipulate as numbers, not strings. Then again, Ada's 'value makes it pretty easy to do the transformation. However, the user would have to handle any errors due to the value being the wrong type. Its tough to tell from nothing more than an uncommented example, but it looked like there was a wee bit more structure to it than just a bunch of attribute/value pairs. If that's the case, Maps could probably not be used, and a special structure might be required. It would be nice to know how much structure there really should be, and what it could be. The way the NT registry works, Keys are stored in a hierarchy (think of them as directories), and each one may have multiple "values". A value has 3 attributes, its name, its *type*, and its actual value. There are lots of different possible types, but in general they are all a pain to deal with. :-) Most folks just stick to the string or string array types. > Assuming we get a Grace component to do this, it might even make a nice > extension to the Grace library - a descendent of Maps that handles If we are talking of it as a standard Ada thing, then I agree.