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,189a28164788ed2e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-21 13:33:36 PST Path: archiver1.google.com!news2.google.com!newsfeed.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: Subject: Re: Using "with function" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <6El67.386528$p33.7799611@news1.sttls1.wa.home.com> Date: Sat, 21 Jul 2001 20:30:58 GMT NNTP-Posting-Host: 24.248.56.237 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 995747458 24.248.56.237 (Sat, 21 Jul 2001 13:30:58 PDT) NNTP-Posting-Date: Sat, 21 Jul 2001 13:30:58 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:10412 Date: 2001-07-21T20:30:58+00:00 List-Id: "Matt Raikes" wrote in message news:ab21b49a.0107200756.41292cf3@posting.google.com... > I ran across this in some code I was examining and I have no clue how > the with function part works or what its purpose is. > > generic > type Element_Type is private; > with function "="( Left, Right: Element_Type ) return Boolean; > > > please help It's a generic subprogram parameter. In the instantiation of the generic, an actual subprogram is specified for "=" (in this case), and then every occurence of the generic "=" in the generic is replaced by the actual "=" in the program unit created by the instantiation. The generic is letting the instantiator determine how to do "=". -- mark