From: tmoran@acm.org
Subject: Re: Array Of Constant Strings?
Date: Fri, 14 Feb 2003 20:38:47 GMT
Date: 2003-02-14T20:38:47+00:00 [thread overview]
Message-ID: <rtc3a.103542$tq4.3858@sccrnsc01> (raw)
In-Reply-To: 3E4D46B9.6060805@acm.org
>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.
next prev parent reply other threads:[~2003-02-14 20:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-14 2:58 Array Of Constant Strings? Dr Nancy's Sweetie
2003-02-14 4:28 ` tmoran
2003-02-14 7:28 ` Dale Stanbrough
2003-02-14 7:47 ` tmoran
2003-02-14 10:06 ` Dale Stanbrough
[not found] ` <19guh-2f4.ln1@beastie.ix.netcom.com>
2003-02-14 19:41 ` Jeffrey Carter
2003-02-14 20:38 ` tmoran [this message]
[not found] ` <e0q0i-n14.ln1@beastie.ix.netcom.com>
2003-02-15 22:28 ` Jeffrey Carter
2003-02-22 19:31 ` Robert A Duff
2003-04-14 18:43 ` Dr Nancy's Sweetie
2003-04-15 11:36 ` Georg Bauhaus
2003-04-15 13:40 ` Dr Nancy's Sweetie
2003-04-15 15:13 ` Georg Bauhaus
2003-04-16 2:17 ` Matthew Heaney
2003-04-16 16:35 ` Chad R. Meiners
2003-04-16 21:03 ` Georg Bauhaus
2003-04-17 17:53 ` Robert A Duff
2003-04-17 20:34 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox