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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.98.99 with SMTP id u63mr848571yhf.49.1431033149339; Thu, 07 May 2015 14:12:29 -0700 (PDT) X-Received: by 10.140.34.182 with SMTP id l51mr13419qgl.8.1431033149300; Thu, 07 May 2015 14:12:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!j5no5938621qga.1!news-out.google.com!t92ni214qga.1!nntp.google.com!j5no5938615qga.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 7 May 2015 14:12:29 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=88.207.251.1; posting-account=sDyr7QoAAAA7hiaifqt-gaKY2K7OZ8RQ NNTP-Posting-Host: 88.207.251.1 References: <47c7df1e-17c1-44cb-a455-43431f0d39cd@googlegroups.com> <85zj5wb9et.fsf@stephe-leake.org> <4b14659e-8c26-4c0a-8945-a5289740e054@googlegroups.com> <51c639dd-a48c-4130-becd-750cb23094da@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <35aabdcd-6064-4999-9cdf-d143b0593a31@googlegroups.com> Subject: Re: Textedit and txt From: Laurent Injection-Date: Thu, 07 May 2015 21:12:29 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:25767 Date: 2015-05-07T14:12:29-07:00 List-Id: On Wednesday, May 6, 2015 at 11:23:36 PM UTC+2, Randy Brukardt wrote: Hi I tried to put that package together but I get this error on the second function: 14:4 no visible subprogram matches the specification for "+" 14:4 missing specification for "Drop" with Ada.Strings.Bounded; package Common_Defs is V_String_Length : constant := 256; package V_String is new Ada.Strings.Bounded.Generic_Bounded_Length (V_String_Length); function "+" (Right : V_String.Bounded_String) return String renames V_String.To_String; function "+" (Right : String) return V_String.Bounded_String ^----- error renames V_String.To_Bounded_String; end Common_Defs; I have no idea what the compiler is complaining about. > Note that some people hate using "+" this way, because they think it has > something to do with numerics. We really should have something non-specific > (say an operator "#"), but the ARG is always split between people that think > we already have such an operator ("+") and thus we don't need another one > and those that are repulsed by using "+" this way. (Getting these put into > the packages themselves failed for similar reasons. Grumble.) Well if it makes life easier why not use it. And if someone does't like to use a '+' then take something else, as long as you remember what it is doing. >I'd prefer a completely different design for both of these packages, so we could add some >mechanism to allow direct conversions, but that's likely too radical.) Why would that be too radical? Thanks Laurent