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.36.83.11 with SMTP id n11mr15254281itb.48.1516195172548; Wed, 17 Jan 2018 05:19:32 -0800 (PST) X-Received: by 10.157.85.15 with SMTP id l15mr66547oth.12.1516195172432; Wed, 17 Jan 2018 05:19:32 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no2482477ita.0!news-out.google.com!s63ni6952itb.0!nntp.google.com!g80no2945398itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 17 Jan 2018 05:19:32 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83cd:ca0f:5846:d4f6:f47d:b8e7; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83cd:ca0f:5846:d4f6:f47d:b8e7 References: <14a35359-150a-4aa6-b437-19c74381be4b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: strange length check error From: AdaMagica Injection-Date: Wed, 17 Jan 2018 13:19:32 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 198603871 X-Received-Bytes: 2044 Xref: reader02.eternal-september.org comp.lang.ada:49954 Date: 2018-01-17T05:19:32-08:00 List-Id: Am Mittwoch, 17. Januar 2018 13:13:49 UTC+1 schrieb Mehdi Saada: > I get it, it's ugly, inefficient, wrong, I KNOW, but it's not mine, and I can't affor rewriting *every* piece of code that come along the exercices. > Well, I could replace the actual > type BOUNDED_STRING is record > LENGTH: NATURAL := 0; > DATA: STRING (1 .. 80); <---- I guess *you* forgot this or else it's illegal > end record; Then of course this will raise an exception: return (LENGTH(LEFT) + 1, LEFT.DATA(1..LENGTH(LEFT)) & RIGHT); since LEFT.DATA(1..LENGTH(LEFT)) & RIGHT is shorter than 80. Who is the *teacher*?