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,ca20ac98709f9b4a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!postnews.google.com!40g2000prx.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Array of Strings Date: Mon, 29 Sep 2008 08:51:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <0e021c61-535a-4935-95ad-2a241fa7302f@e53g2000hsa.googlegroups.com> <2VaCk.356477$yE1.321489@attbi_s21> <5a8cb0df-b16a-45d0-a03e-146ebea83e4d@d77g2000hsb.googlegroups.com> <0faf40a8-aac2-42ed-a536-1cc5a9c5d819@8g2000hse.googlegroups.com> <2vQDk.363714$yE1.294891@attbi_s21> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1222703472 17314 127.0.0.1 (29 Sep 2008 15:51:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Sep 2008 15:51:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 40g2000prx.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2138 Date: 2008-09-29T08:51:12-07:00 List-Id: On Sep 28, 12:00 pm, "Jeffrey R. Carter" wrote: > In your case, it sounds as if you need > > with function ">" ... One other thing: It looks like, in the body of your generic, you're using both < and >. (I assume you did get errors about both operators and just didn't mention it in your post?) You will need to say either with function ">" (Left, Right... or with function "<" (Left, Right... in the generic formal part as the Mock Turtle and the Mad Ha.... um, I mean Jeff have pointed out. But please note that defining one won't automatically give you the other (there is no rule in the language that says BB for all types, although it's true for predefined types and one-dimensional arrays of predefined types). So you will either need to fix the body so it consistently uses either < or >, but not both; or you'll need to include "with function" clauses for *both* operators. My own preference would be for the first option; if you're instantiating with a string type or other predefined types, it doesn't matter that much since the compiler will automatically define both for you anyway; but if you're going to use some user-defined record type where the user will need to write their own "<" or less-than operator, having two "with function" clauses would force them to write subroutines for both operators, which shouldn't be necessary IMHO. -- Adam