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-20 22:21:48 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Using "with function" References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Sat, 21 Jul 2001 05:21:47 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 995692907 24.7.82.199 (Fri, 20 Jul 2001 22:21:47 PDT) NNTP-Posting-Date: Fri, 20 Jul 2001 22:21:47 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:10385 Date: 2001-07-21T05:21:47+00:00 List-Id: >generic > type Element_Type is private; > with function "="( Left, Right: Element_Type ) return Boolean; > >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. You *really* need a book or at least an on-line tutorial or something. Look at www.adapower.com This generic has two parameters: a type and a function named "=" that, presumably, compares two objects of Element_Type for equality. You might instantiate with Element_Type being an employee record and "=" being a function that compares ID number. For the company carpool, you might instead supply an "=" function that compares zip code. Yet a third instantiation might have a password string as the Element_Type and the "=" might compare ignoring case. Oops, bad idea.