comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Empty String confusion; Positive and Natural
Date: Tue, 30 Nov 2021 08:21:28 +0000	[thread overview]
Message-ID: <lytufuvyt3.fsf@pushface.org> (raw)
In-Reply-To: nnd$23404336$0a486277@9b8ca000aec60c20

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

  reply	other threads:[~2021-11-30  8:21 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 [this message]
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