From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ad4:5aeb:: with SMTP id c11mr37174361qvh.69.1638274639618; Tue, 30 Nov 2021 04:17:19 -0800 (PST) X-Received: by 2002:a25:7613:: with SMTP id r19mr41015615ybc.498.1638274639482; Tue, 30 Nov 2021 04:17:19 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 30 Nov 2021 04:17:19 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=92.40.187.174; posting-account=5K6RMgoAAADQeoHIOMi2dg5aYc0IVxGi NNTP-Posting-Host: 92.40.187.174 References: <053c8a45-2829-4f2e-925c-b72308c1fe61n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Empty String confusion; Positive and Natural From: Kevin Chadwick Injection-Date: Tue, 30 Nov 2021 12:17:19 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63171 List-Id: I have a create function that returns a type RunOutput I always get range check failed even with a string of multiple characters. type RunOutput(LogLen, OutputLen : Natural) is record LogStr : String(0..LogLen); Output : String(0..OutputLen); ... end record; I did have the following which works, so long as the string is not empty type RunOutput(LogLen, OutputLen : Positive) is record LogStr : String(1..LogLen); Output : String(1..OutputLen); ... end record; P.s. I am not using exceptions with messages for log strings because I would rather use features that work with the zero footprint runtime as much as possible, where it makes sense.