comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: phone number database
Date: Thu, 27 Feb 2003 18:09:33 GMT
Date: 2003-02-27T18:09:33+00:00	[thread overview]
Message-ID: <xvs7a.255909$SD6.12007@sccrnsc03> (raw)
In-Reply-To: uk7fliqhx.fsf_-_@nasa.gov

>> Six phone numbers: 1795, 2006, 2007, 2012, 2013, 2014.
> Use a SAL binary tree

If all the OP wants is a Presence test on a small number of possibilities,
a simple loop seems appropriate.  If high speed is required (seems
unlikely for this application...), a Boolean lookup array
  type Phone_Numbers is range 1000 .. 9999;
  Is_Present : constant array(Phone_Numbers) of Boolean
    := (1795 | 2006 | 2007 | 2012 | 2013 | 2014 => True,
        others=>False);
would do the job.



  reply	other threads:[~2003-02-27 18:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 18:00 Variant Record Component John Harbaugh
2003-02-26 19:08 ` Stephen Leake
2003-02-27  8:17   ` Anders Wirzenius
2003-02-27  8:46     ` John McCabe
2003-02-27 17:26     ` phone number database Stephen Leake
2003-02-27 18:09       ` tmoran [this message]
2003-02-28  0:07       ` Matthew Heaney
2003-02-28  6:46       ` Hijacking threads (was phone number database (was Variant Record Component)) Anders Wirzenius
2003-02-26 20:50 ` Variant Record Component David C. Hoos
2003-02-28 16:15   ` John Harbaugh
2003-02-28 18:18     ` tmoran
2003-02-28 22:07       ` John Harbaugh
2003-02-28 20:51     ` Randy Brukardt
2003-03-01  2:34     ` Jeffrey Carter
2003-03-03  9:24     ` John McCabe
2003-02-26 21:37 ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox