comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: How do I allocate strings of variable length at runtime?
Date: 1997/10/07
Date: 1997-10-07T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.97Oct7171536@spectre.mitre.org> (raw)
In-Reply-To: 342FDBDA.67D8427E@linkabit.titan.com


In article <342FDBDA.67D8427E@linkabit.titan.com> Marc Bejerano <t_mjb@linkabit.titan.com> writes:

  > Just use Ada.Strings.Unbounded and when you need to call
  > Text_IO.Open simply pass it the To_String version of your
  > variable.
 
  Correct, very correct! ;-)

  > This will solve your dilemma regarding the blanks at he end of the string.

  Note that this solves the dilemma by eliminating it completely.
Unbounded strings are an abstract type which have the property of a
current length, but no concept of padding.  Exactly what you want.
The actual implementation may or may not be complex, but the author
doesn't even have to think about that.


--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




      reply	other threads:[~1997-10-07  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-26  0:00 How do I allocate strings of variable length at runtime? Oliver Hilgendorf
1997-09-26  0:00 ` William A Whitaker
1997-09-26  0:00 ` Matthew Heaney
1997-09-29  0:00   ` Marc Bejerano
1997-10-07  0:00     ` Robert I. Eachus [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