From: jconley@mindspring.com (James Conley)
Subject: Ada generics / GNAT Heap-sort
Date: 1996/11/03
Date: 1996-11-03T20:29:34+00:00 [thread overview]
Message-ID: <55ivbe$bn2@camel4.mindspring.com> (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
reply other threads:[~1996-11-03 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox