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-Thread: 103376,68a59f01eb1998d3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!uns-out.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada generics and private type operations References: From: Stephen Leake Date: Sat, 14 Oct 2006 03:46:30 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:VbXR1CHyv5LD8IrKw4D1NuDprEM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 61e53453095d9759e00d407064 Xref: g2news2.google.com comp.lang.ada:6960 Date: 2006-10-14T03:46:30-04:00 List-Id: Robert Sinclair writes: > I've written a generic using Ada 95. The generic has 5 private > types. I'm trying to perform ">=" and "<=" operations on the private > types to no avail. I'm using 'With Function ">=" (l, r : > private_type) return boolean' in the declaration of the generic. I > can't seem to figure out how to code the instantiating program to > actually perform the operation. Can someone please provide a simple > code example? We need to see your code first. One general rule I follow is to use names rather than operator symbols for generic parameters; generic with function Greater_Equal ...; ... That makes it clearer what is going on. The overloading/inheritance rules for operator symbols can be hard to understand. After you get things working this way, you can try replacing Greater_Equal with ">=", and see if it breaks. -- -- Stephe