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!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Array of Strings 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> In-Reply-To: <0faf40a8-aac2-42ed-a536-1cc5a9c5d819@8g2000hse.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <2vQDk.363714$yE1.294891@attbi_s21> NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1222628414 12.201.97.213 (Sun, 28 Sep 2008 19:00:14 GMT) NNTP-Posting-Date: Sun, 28 Sep 2008 19:00:14 GMT Organization: AT&T ASP.att.net Date: Sun, 28 Sep 2008 19:00:14 GMT Xref: g2news1.google.com comp.lang.ada:2122 Date: 2008-09-28T19:00:14+00:00 List-Id: jedivaughn wrote: > This is going to be a long post but hopefully I'll make myself clearer > this time. I finally got everything set up in my package and it works > just fine. however one of the operations that I'm trying to do on the > package is an append. after appending to the list I want to make sure > the list is still in order. so I have to make comparisons with the < > or > operators. however, ada give's me the error: "final.adb:22:34: > there is no applicable operator ">" for private type "Element_Type" > defined at final.ads:3." > > Here is my package's .ads file > > generic > > type Element_Type is private; -- everything in the list is of this > type You should think of the generic formal part (the part between "generic" and "package") as a specification: it specifies what the generic needs from its clients in order to do what it does. The various kinds of formal parameters to a generic specify different things. For example type T1 is range <>; specifies that the generic needs all the features and operations of a signed integer type. This includes assignment and conversion from other numeric types. type T2 is (<>); specifies that the generic needs a discrete type. This includes integer types (signed and unsigned) and enumeration types. The set of features and operations used by the generic is naturally different from those for T1. type T3 is private; specifies that the generic needs to be able to create objects of the type without initialization, or declare composite types with components of the type. It specifies that the generic will use assignment of values of the type, and the "=" and "/=" operations. That is just about all the generic needs from the type, unless it explicitly specifies that it needs additional operations on the type in the form of generic formal subprogram parameters operating on the type: generic type T is private; with function "-" (Left : in T; Right : in T) return T is <>; package P is ... In your case, it sounds as if you need with function ">" ... -- Jeff Carter "People called Romanes, they go the house?" Monty Python's Life of Brian 79