comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: function to generic
Date: Mon, 12 Nov 2001 15:11:48 -0500
Date: 2001-11-12T15:11:48-05:00	[thread overview]
Message-ID: <tv0b1l3l0p144f@corp.supernews.com> (raw)
In-Reply-To: 0KJ+h2G3o9zP@ludens


<kotee@ludens.elte.hu> wrote in message news:0KJ+h2G3o9zP@ludens...
> hi all
>
> i write my own data type, but i need an "=" operator for it.

Do you mean assignment, or a test for equality?  I assume you mean test for
equality:

package P is

   type T is limited private;
   function "=" (L, R : T) return Boolean;
...
end P;

> i know that generic packages can get functions as
> parameter. how it works exactly? i try to find out
> from ref guides, but i don't find it. :((

Is your package generic?  Do you want to declare a generic formal
subprogram?

generic
   type Element_Type is private;
   with function "=" (L, R : Element_Type) return Boolean is <>;
package GP is ...







      parent reply	other threads:[~2001-11-12 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-12 18:48 function to generic kotee
2001-11-12 19:02 ` Preben Randhol
2001-11-13 16:07   ` kotee
2001-11-12 20:11 ` Matthew Heaney [this message]
replies disabled

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