comp.lang.ada
 help / color / mirror / Atom feed
From: ldries46 <bertus.dries@planet.nl>
Subject: Re: Empty String confusion; Positive and Natural
Date: Tue, 30 Nov 2021 13:39:28 +0100	[thread overview]
Message-ID: <nnd$1d39ac24$50e63d55@24a051383f433873> (raw)
In-Reply-To: <lytufuvyt3.fsf@pushface.org>

Op 30-11-2021 om 9:21 schreef Simon Wright:
> ldries46 <bertus.dries@planet.nl> writes:
>
>> Empty_String : Unbounded_String := To_Unbounded_String("");
> * Given the name, you should probably declare it constant.
>
> * You don't need to initialize it, ARM 4.5(73) [1] says "If an object of
>    type Unbounded_String is not otherwise initialized, it will be
>    initialized to the same value as Null_Unbounded_String".
>
> * Ada.Strings.Unbounded.Null_Unbounded_String is a constant empty
>    string.
>
> [1] http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-A-4-5.html#p73
You are right. it should be

Empty_String : constant Unbounded_String := To_Unbounded_String("");

      reply	other threads:[~2021-11-30 12:39 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
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 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox