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:5de3:: with SMTP id jn3mr44788786qvb.22.1638207288448; Mon, 29 Nov 2021 09:34:48 -0800 (PST) X-Received: by 2002:a25:b8c7:: with SMTP id g7mr36111024ybm.115.1638207288272; Mon, 29 Nov 2021 09:34:48 -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: Mon, 29 Nov 2021 09:34:47 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=92.40.203.37; posting-account=5K6RMgoAAADQeoHIOMi2dg5aYc0IVxGi NNTP-Posting-Host: 92.40.203.37 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <053c8a45-2829-4f2e-925c-b72308c1fe61n@googlegroups.com> Subject: Empty String confusion; Positive and Natural From: Kevin Chadwick Injection-Date: Mon, 29 Nov 2021 17:34:48 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63161 List-Id: I suspect that I am doing something outside of Ada norms. Are empty strings avoided in Ada? I have a function to create a record containing strings amongst other things like a subtyped integer, simply to group the outputs neatly of another function. If something goes wrong and I run the create function with "" then the strings length is zero. Why is a string type Positive and not Natural, because empty strings are in fact useless? I guess I shall consider re-engineering my functions, rather than add checks, but all thoughts are welcome.