From: Samuel Tardieu <sam@ada.eu.org>
Subject: Re: How to initiate part of a string?
Date: 1998/08/25
Date: 1998-08-25T00:00:00+00:00 [thread overview]
Message-ID: <m37lzx3q8l.fsf@zaphod.enst.fr> (raw)
In-Reply-To: 35e2dc46.1973509@SantaClara01.news.InterNex.Net
Tom> Do you mean
Tom>
Tom> Txt : String(1 .. 100) := (1 .. 27=>' ', "abcd",31..100=>' '):
This is not valid Ada.
One way to do it is (as Mark wrote) is to put a pragma Elaborate_Body
in the spec and initialize that part of the string in the body
elaboration.
Put I wouldn't have said "use pragma Elaborate_Body to keep the
compiler happy", but instead "use pragma Elaborate_Body so that you
know that the string have been initialized when you're using it from
another package".
Sam
--
Samuel Tardieu -- sam@ada.eu.org
next prev parent reply other threads:[~1998-08-25 0:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-24 0:00 How to initiate part of a string? Hans Marqvardsen
1998-08-25 0:00 ` Mark A Biggar
1998-08-25 0:00 ` Tom Moran
1998-08-25 0:00 ` Samuel Tardieu [this message]
1998-08-26 0:00 ` Tom Moran
1998-08-26 0:00 ` Robert I. Eachus
1998-08-26 0:00 ` Tom Moran
1998-09-24 0:00 ` Bob Fletcher
1998-09-24 0:00 ` Tom Moran
1998-09-25 0:00 ` dewarr
1998-09-29 0:00 ` Aidan Skinner
1998-09-19 0:00 ` dewarr
1998-08-26 0:00 ` Frank Ecke
1998-08-26 0:00 ` Robert I. Eachus
1998-08-26 0:00 ` Mats Weber
1998-08-26 0:00 ` Frank Ecke
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox