From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Empty String confusion; Positive and Natural
Date: Mon, 29 Nov 2021 19:05:21 +0100 [thread overview]
Message-ID: <so34p1$g6r$1@dont-email.me> (raw)
In-Reply-To: <053c8a45-2829-4f2e-925c-b72308c1fe61n@googlegroups.com>
On 2021-11-29 18:34, Kevin Chadwick wrote:
>
> 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 don't understand what you're asking. 'Length returns
universal_integer; it is independent of the index subtype. The index
subtype can even be non-numeric.
--
Jeff Carter
Programming by extension, emphasizing, as it does,
ease of writing over ease of reading, should be
avoided whenever possible by S/W engineers, and
used with the same reluctance and care that they
give to gotos and access types.
175
next prev parent reply other threads:[~2021-11-29 18:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 17:34 Empty String confusion; Positive and Natural Kevin Chadwick
2021-11-29 18:05 ` Jeffrey R.Carter [this message]
2021-11-29 19:19 ` Niklas Holsti
2021-11-29 22:50 ` Kevin Chadwick
2021-11-30 8:29 ` Simon Wright
2021-11-30 8:34 ` Niklas Holsti
2021-11-30 10:00 ` Jeffrey R.Carter
2021-11-30 12:17 ` Kevin Chadwick
2021-11-30 12:54 ` J-P. Rosen
2021-11-30 13:12 ` Kevin Chadwick
2021-11-30 7:40 ` ldries46
2021-11-30 8:21 ` Simon Wright
2021-11-30 12:39 ` ldries46
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox