comp.lang.ada
 help / color / mirror / Atom feed
* Ada generics / GNAT Heap-sort
@ 1996-11-03  0:00 James Conley
  0 siblings, 0 replies; only message in thread
From: James Conley @ 1996-11-03  0:00 UTC (permalink / raw)



I'm trying to instatiate the heap-sort (generic version) that came
with GNAT (3.04A WIN32).  I have created my own(main) procedure that
will sort of act like a driver, created an array type (of ints) and
with'ed gnat.heap_sort_g.  Furhter, after careful examination of
gnat.heap_sort_g.adb and and .ads specification file it appears that I
need to supply the functions Lt (less than) and move (swap).  I am
having trouble figureing out exactly how to do this and have looked up
generics in two different textbooks only to seemingly get shafted on
this.  I am still confused.  The package specification for
gnat.heap_sort_g says something like...
generic
	type whatever is whatever else;
	etc
	procedure move(from,to:natural) ;
	procedure lt(ob1,ob2:natural) return boolean;
package gnat.heap_sort_g is
end gnat.heap_sort_g;

(leaving out alot of other stuff), so I am thinking that I must create
these functions LT, and Move exactly according to the specifications
(since its not the the .adb file).  So i created my own lt and move in
my procedure but gnatmake still responds with an error.  Am I doing
something obviously wrong like going at this the wrong way or what?
Can someone please give me a pointer to the right way to instatite
this package?
Thanks
james
jconley@mindspring.com






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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-03  0:00 Ada generics / GNAT Heap-sort James Conley

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