From: tmoran@acm.org
Subject: Re: Using "with function"
Date: Sat, 21 Jul 2001 05:21:47 GMT
Date: 2001-07-21T05:21:47+00:00 [thread overview]
Message-ID: <Lj867.233483$%i7.131696537@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: ab21b49a.0107200756.41292cf3@posting.google.com
>generic
> type Element_Type is private;
> with function "="( Left, Right: Element_Type ) return Boolean;
>
>I ran across this in some code I was examining and I have no clue how
>the with function part works or what its purpose is.
You *really* need a book or at least an on-line tutorial or something.
Look at www.adapower.com
This generic has two parameters: a type and a function named "="
that, presumably, compares two objects of Element_Type for equality.
You might instantiate with Element_Type being an employee record
and "=" being a function that compares ID number.
For the company carpool, you might instead supply an "=" function that
compares zip code.
Yet a third instantiation might have a password string as the
Element_Type and the "=" might compare ignoring case. Oops, bad idea.
next prev parent reply other threads:[~2001-07-21 5:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-20 15:56 Using "with function" Matt Raikes
2001-07-21 5:21 ` tmoran [this message]
2001-07-21 20:30 ` Mark Lundquist
2001-10-29 17:58 ` Matthew Heaney
2001-10-30 17:49 ` Mark Lundquist
2001-10-30 22:45 ` Steven Deller
2001-11-03 4:15 ` Mark Lundquist
2001-11-03 5:11 ` Computer Language Shootout Eric Merritt
2001-11-03 6:50 ` tmoran
2001-11-03 7:15 ` Al Christians
2001-11-03 8:52 ` martin.m.dowie
2001-11-03 14:04 ` Ted Dennison
2001-11-03 14:24 ` martin.m.dowie
2001-11-03 14:49 ` Larry Kilgallen
2001-11-03 23:03 ` research@ijs.co.nz
2001-11-04 6:39 ` tmoran
2001-11-04 13:44 ` Larry Kilgallen
2001-11-05 0:59 ` Adrian Hoe
2001-11-05 8:04 ` David Brown
2001-11-06 6:36 ` AG
2001-11-06 8:05 ` tmoran
2001-11-07 8:58 ` AG
2001-11-06 12:07 ` Larry Kilgallen
2001-11-07 6:19 ` Richard Riehle
2001-11-04 15:59 ` Preben Randhol
2001-11-04 20:04 ` martin.m.dowie
2001-10-31 7:00 ` Using "with function" Richard Riehle
2001-10-31 15:58 ` 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