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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews.google.com!y21g2000hsf.googlegroups.com!not-for-mail From: mockturtle Newsgroups: comp.lang.ada Subject: Re: Array of Strings Date: Mon, 29 Sep 2008 04:14:42 -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> NNTP-Posting-Host: 158.110.28.116 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1222686882 28826 127.0.0.1 (29 Sep 2008 11:14:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Sep 2008 11:14:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y21g2000hsf.googlegroups.com; posting-host=158.110.28.116; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030708,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2134 Date: 2008-09-29T04:14:42-07:00 List-Id: jedivaughn ha scritto: > where would I code > > "with function ">"(left, right : Element_Type) return Boolean is <>; " > > I assume in the generic part of the .ads file. do I have to change the > lines > > > package list is new final (element_type=>str25, range_array => > str_range); > > package list2 is new final (element_type => integer, > range_array => int_range); > In this case it is not necessary to change the "...is new..." lines since (1) your types (str25 and integer) have a predefined ">" operator and (2) you used the subprogram_default part "is <>". If your comparison was implemented as function (say) Greater_Than, the you would had to add in the instantiation lines something like ">" => Greater_Than