From: mmann@ibm.net (Gerd Moellmann)
Subject: Re: private types and >
Date: 1996/03/16
Date: 1996-03-16T00:00:00+00:00 [thread overview]
Message-ID: <mmannag1genoz.fsf@ibm.net> (raw)
In-Reply-To: 4icphv$r59@mother.usf.edu
kramer@suntan.eng.usf.edu (Todd Kramer (GE)) writes:
> I was wondering if anyone out there could help me. I'm trying to write a
> generic package to implement a doubly linked circular list. I wanted to
> mak it sort based one of the data fileds in the records I am using but I
> can't get it to let me compare directly since that operation is normally
> not allowed on private types. I have tried sing function key_of to return
> a key and then "<". However, it will not recognize this as a valid
> operator either which my book says it should. Is there another way to do
> this under gnat that is maybe nonstandard or something? If any of you
> know PLEASE email me or drop me a reply.
>
>
> thanks in advance
>
> TK
Did you try something like this?
generic
type Element_Type is private;
with function "<" (X, Y : in Element_Type) return Boolean is <>;
package Sorted_List is
...
end Sorted_List;
--
Gerd Moellmann, Altenbergstr. 6, D-40235 Duesseldorf, Germany
Software Development & Consulting
Internet: mmann@ibm.net / CIS: 100025,3303 / Phone: +49 211 666 881
parent reply other threads:[~1996-03-16 0:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4icphv$r59@mother.usf.edu>]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox