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,63b2334396c35f63 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-12 12:08:21 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: function to generic Date: Mon, 12 Nov 2001 15:11:48 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <0KJ+h2G3o9zP@ludens> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:16366 Date: 2001-11-12T15:11:48-05:00 List-Id: wrote in message news:0KJ+h2G3o9zP@ludens... > hi all > > i write my own data type, but i need an "=" operator for it. Do you mean assignment, or a test for equality? I assume you mean test for equality: package P is type T is limited private; function "=" (L, R : T) return Boolean; ... end P; > i know that generic packages can get functions as > parameter. how it works exactly? i try to find out > from ref guides, but i don't find it. :(( Is your package generic? Do you want to declare a generic formal subprogram? generic type Element_Type is private; with function "=" (L, R : Element_Type) return Boolean is <>; package GP is ...