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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp4-2.free.fr!not-for-mail Subject: Re: Ada.Strings.Fixed.Count raises Storage_Error Newsgroups: comp.lang.ada References: <57346ac8$0$4570$426a74cc@news.free.fr> From: Xavier Petit Date: Mon, 27 Jun 2016 02:51:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <57707888$0$5274$426a34cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 27 Jun 2016 02:51:20 CEST NNTP-Posting-Host: 78.217.21.11 X-Trace: 1466988680 news-4.free.fr 5274 78.217.21.11:55562 X-Complaints-To: abuse@proxad.net Xref: news.eternal-september.org comp.lang.ada:30951 Date: 2016-06-27T02:51:20+02:00 List-Id: I’m sorry, I thought that Ada was a perfect software tool built upon a vast, incoherent and inconsistent bloatware. I realize that Ada has to make compromises and is far away from perfection. It’s just a more advanced programming language with the right goals. It produces less buggued software. I agree with you that the string given in the example is too big, it’s the max size ! I encountered this error with a weird benchmark. But following the principles and philosophy behind Ada I think that the behavior in the GNAT compiler should be either documented (to not have a string with Positive'Last length), either corrected, with for example the code proposed above by Jeffrey R. Carter. Every parameters of a subprogram should be anticipated and produce a coherent behavior. It’s hard but Ada is especially here to make it easier. -- Xavier Petit