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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.31.141 with SMTP id f135mr30327345iof.43.1516205746151; Wed, 17 Jan 2018 08:15:46 -0800 (PST) X-Received: by 10.157.11.180 with SMTP id 49mr81101oth.5.1516205745962; Wed, 17 Jan 2018 08:15:45 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer01.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w142no2538686ita.0!news-out.google.com!s63ni7035itb.0!nntp.google.com!g80no3000752itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 17 Jan 2018 08:15:45 -0800 (PST) In-Reply-To: <6018001a-119d-420f-aac5-d6d463d83778@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.154.191.49; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 82.154.191.49 References: <14a35359-150a-4aa6-b437-19c74381be4b@googlegroups.com> <54e04919-3a18-4b18-8733-1445af3a6229@googlegroups.com> <6018001a-119d-420f-aac5-d6d463d83778@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8bd89f13-4ae1-474d-a78d-459fbb8a737c@googlegroups.com> Subject: Re: strange length check error From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Wed, 17 Jan 2018 16:15:46 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 4199890911 X-Received-Bytes: 3855 Xref: reader02.eternal-september.org comp.lang.ada:49959 Date: 2018-01-17T08:15:45-08:00 List-Id: It's done. I ran the test program, and fortunately, it tells nothing about = the core package I spent time on. At least it complies with the specificati= on, though the behavior might be partialy wrong, I'll see that later. But i= t still shows error with IO child package, which I modified too but contain= s only: function Get_Line ( File : File_Type :=3D Standard_Input ) return Bounded_String; procedure Put_Line ( File : File_Type :=3D Standard_Output; Item : in Bounded_String ); procedure Put ( File : File_Type :=3D Standard_Output; Item : in Bounded_String ); as specs, and as bodies: procedure Put ( File : File_Type :=3D Standard_Output; Item : in Bounded_String ) is begin Put(File, Item.Data ); end Put; procedure Put_Line ( File : File_Type :=3D Standard_Output; Item : in Bounded_String ) is begin Put_Line (File, Item.Data ); end Put_Line; function Get_Line ( File : File_Type :=3D Standard_Input ) return Bounded_String is Ch : Unbounded_String; begin Ch :=3D Get_Line(File); return (Length(Ch), Slice(Ch,1,Length(Ch))); end Get_Line; Originally, there was subprograms with, and without the File parameters. I = didn't get why, and put instead default file parameters. I suspect there is= a reason I never saw such default parameters in generic package before, bu= t I couldn't help but give a try... There are the errors: crea_ora.adb:32:07: no candidate interpretations match the actuals: crea_ora.adb:32:07: too many arguments in call to "Put_Line" crea_ora.adb:32:17: expected private type "Ada.Text_Io.File_Type" crea_ora.adb:32:17: found private type "Bounded_String" defined at p_bounde= d_g.ads:21, instance at p_bounded_80.ads:6 crea_ora.adb:32:17: =3D=3D> in call to "Put_Line" at p_bounded_g-p_bounde= d_g_io.ads:17, instance at p_bounded_io_80.ads:9 crea_ora.adb:32:17: =3D=3D> in call to "Put_Line" at a-textio.ads:259 One such piece for each call on Put, Put_Line or Get_Line.