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,5430b81ad265fc75 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-14 12:38:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Array Of Constant Strings? References: <3E4D46B9.6060805@acm.org> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1045255127 12.234.13.56 (Fri, 14 Feb 2003 20:38:47 GMT) NNTP-Posting-Date: Fri, 14 Feb 2003 20:38:47 GMT Organization: AT&T Broadband Date: Fri, 14 Feb 2003 20:38:47 GMT Xref: archiver1.google.com comp.lang.ada:34107 Date: 2003-02-14T20:38:47+00:00 List-Id: >If all the strings are always the same length, then using fixed length >strings is even simpler. However, I would tend to be suspicious of such >a requirement; things like that are almost always changed later. Plug: One of the packages I recently posted (www.adapower.com/os/notify.html) is WORM_Str - Write Once Read Many Strings. It's exactly intended for situations where you never delete from a table of strings. Name_Store : WORM_Str.Store_Type(Max_Strings=> some number Max_Characters=> another number Task_Safe=> boolean ... WORM_Str.Add(Name_Store, "Anthony", a); WORM_Str.Add(Name_Store, "Barbara", b); WORM_Str.Add(Name_Store, "Joe", c); etc, and Ada.Text_IO.Put(WORM_Str.Get(Name_Store, b)); -- or whatever >array so later I can read in a strings and see if it matches one on WORM_Str also includes an internal subpackage that adds binary search and sorted dump capabilities. WORM_Str is not OS, compiler, or library dependent, but just plain Ada.