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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31a8e118c303e8b3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-22 19:29:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.cwix.com!wn2feed!wn1feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: "Steve Doiel" Newsgroups: comp.lang.ada References: <8235efb6.0203221737.44abefff@posting.google.com> Subject: Re: beginner ada generic fonction X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <3ESm8.101615$q2.10433@sccrnsc01> NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1016854143 12.225.227.101 (Sat, 23 Mar 2002 03:29:03 GMT) NNTP-Posting-Date: Sat, 23 Mar 2002 03:29:03 GMT Organization: AT&T Broadband Date: Sat, 23 Mar 2002 03:29:03 GMT Xref: archiver1.google.com comp.lang.ada:21569 Date: 2002-03-23T03:29:03+00:00 List-Id: Since you obviously don't have a textbook, I'd like to point you to the relevent chapter of one you can find on-line: http://www.it.bton.ac.uk/staff/je/adacraft/ch12.htm I hope this helps, SteveD "annabelle" wrote in message news:8235efb6.0203221737.44abefff@posting.google.com... > Hello, > > I was given a spec(ADS)using genericity. I have to use the function > "TheKey" (see below) > > ______________________________________________________________________ > GENERIC > TYPE Element_type IS Private > Key_type IS Private; > > WITH Function TheKey (my_item : Element_type) Return Key_type; > > WITH Function "<" (Left,Right: Key_type) Return Boolean; > ______________________________________________________________________ > > I am trying to use the function "TheKey" in my ADA program but I need > to use the function for TWO different type of elements !!! > ______________________________________________________________________ > > function TheKey(My_item: a_course) return Course_key_type is > > begin > Return My_item.course_key; > end lacle; > ______________________________________________________________________ > > How can I use the same function for another type (a_student)?? > > Please HELP !!!