comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <up.yerz@nospam.com>
Subject: Re: Using "with function"
Date: Sat, 21 Jul 2001 20:30:58 GMT
Date: 2001-07-21T20:30:58+00:00	[thread overview]
Message-ID: <6El67.386528$p33.7799611@news1.sttls1.wa.home.com> (raw)
In-Reply-To: ab21b49a.0107200756.41292cf3@posting.google.com


"Matt Raikes" <mraikes@vt.edu> wrote in message
news:ab21b49a.0107200756.41292cf3@posting.google.com...
> 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.
>
> generic
>     type Element_Type is private;
>     with function "="( Left, Right: Element_Type ) return Boolean;
>
>
> please help

It's a generic subprogram parameter.  In the instantiation of the generic,
an actual subprogram is specified for "=" (in this case), and then every
occurence of the generic "=" in the generic is replaced by the actual "=" in
the program unit created by the instantiation.

The generic is letting the instantiator determine how to do "=".

-- mark






  parent reply	other threads:[~2001-07-21 20:30 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
2001-07-21 20:30 ` Mark Lundquist [this message]
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