comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: Record comparison special case
Date: 1999/12/05
Date: 1999-12-05T00:00:00+00:00	[thread overview]
Message-ID: <384a1027_2@news1.prserv.net> (raw)
In-Reply-To: 829bp3$oba$1@nnrp1.deja.com

In article <829bp3$oba$1@nnrp1.deja.com> , keniwasa@my-deja.com  wrote:

> I have a record made up of records in which only small parts (a few
> fields) are usually significant.
>
> The point is that I would like to compare two such records and determine
> whether the parts that both records consider to be significant are the
> same.  The easiest way I could see to handle this is to have an
> "insignificant" value in every enumeration and have some "insignificant"
> coding for real values, but that's not an option since the types cannot
> be modified.

What's wrong with simply redefining the equality operation of the record
type?

  type RT is tagged record ... end record;

  function "=" (L, R : RT) return Boolean;

Now you can implement "=" so that just the "small parts" of the L and R
records are compared.

--
Time and again the nation's courts have ruled that creationism, as a
religious dogma, cannot be taught in science classes. Now, creationists
are advancing a new tactic: eliminating the teaching of evolution and
other sciences that complement evolution, such as geology, paleontology,
and biological anthropology. By doing so, they are not only endangering
church-state separation but also seriously jeopardizing the science
education of future generations.

http://www.campusfreethought.org/sos/




  reply	other threads:[~1999-12-05  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-03  0:00 Record comparison special case keniwasa
1999-12-05  0:00 ` Matthew Heaney [this message]
1999-12-06  0:00   ` keniwasa
1999-12-06  0:00     ` Matthew Heaney
replies disabled

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