From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,22e3c9c14354609,start X-Google-Attributes: gid103376,public From: jconley@mindspring.com (James Conley) Subject: Ada generics / GNAT Heap-sort Date: 1996/11/03 Message-ID: <55ivbe$bn2@camel4.mindspring.com>#1/1 X-Deja-AN: 194135594 organization: MindSpring Enterprises, Inc. x-server-date: 3 Nov 1996 20:29:34 GMT reply-to: jconley@mindspring.com newsgroups: comp.lang.ada Date: 1996-11-03T20:29:34+00:00 List-Id: 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