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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e7dd5c59df710c50 X-Google-Attributes: gid103376,public From: keniwasa@my-deja.com Subject: Re: Record comparison special case Date: 1999/12/06 Message-ID: <82gqnl$k9c$1@nnrp1.deja.com>#1/1 X-Deja-AN: 557164824 References: <829bp3$oba$1@nnrp1.deja.com> <384a1027_2@news1.prserv.net> X-Http-Proxy: 1.0 x41.deja.com:80 (Squid/1.1.22) for client 140.76.238.7 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Dec 06 17:11:22 1999 GMT X-MyDeja-Info: XMYDJUIDkeniwasa Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (WinNT; I ;Nav) Date: 1999-12-06T00:00:00+00:00 List-Id: In article <384a1027_2@news1.prserv.net>, "Matthew Heaney" wrote: > 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. Is tagged part of Ada95? I'm using Ada83. The problem I had was that the "small parts" are not necessarily the same for all records. I also wanted to be able to merge records whose "small parts" did not conflict and identify records whose "small parts" did conflict. > > -- > 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/ > Ken Sent via Deja.com http://www.deja.com/ Before you buy.