comp.lang.ada
 help / color / mirror / Atom feed
* Re: private types and >
       [not found] <4icphv$r59@mother.usf.edu>
@ 1996-03-16  0:00 ` Gerd Moellmann
  0 siblings, 0 replies; only message in thread
From: Gerd Moellmann @ 1996-03-16  0:00 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-03-16  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4icphv$r59@mother.usf.edu>
1996-03-16  0:00 ` private types and > Gerd Moellmann

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