From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: String_Holder ?
Date: Sun, 18 Dec 2011 13:55:29 -0700
Date: 2011-12-18T13:55:29-07:00 [thread overview]
Message-ID: <jclk03$20kd$1@adenine.netfront.net> (raw)
In-Reply-To: <slrnjerndj.1lme.lithiumcat@sigil.instinctive.eu>
On 12/18/2011 05:34 AM, Natasha Kerensikova wrote:
>
> in my few Ada projects so far, I have quite often encountered the need
> of storing a string along with other information in records. So I went
> for discriminants containing the string size, and putting the string
> directly in the record.
>
> This works well when there is only one or two strings, but with several
> of them, or in variant records, I find it quite heavy. So I was thinking
> about something like that:
>
>
> type String_Holder is still to be defined;
>
> function Hold (S : String) return String_Holder;
>
> function To_String (Holder : String_Holder) return String;
>
> procedure Query (Holder : String_Holder;
> Process : not null access procedure (S : String));
I see no advantage to this over Unbounded_String.
--
Jeff Carter
"Many times we're given rhymes that are quite unsingable."
Monty Python and the Holy Grail
57
--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---
next prev parent reply other threads:[~2011-12-18 20:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-18 12:34 String_Holder ? Natasha Kerensikova
2011-12-18 16:48 ` Brad Moore
2011-12-18 20:55 ` Jeffrey Carter [this message]
2011-12-18 23:08 ` Natasha Kerensikova
2011-12-19 12:14 ` Niklas Holsti
2011-12-19 11:12 ` Martin
2011-12-19 23:53 ` Randy Brukardt
2011-12-22 9:08 ` Natasha Kerensikova
2011-12-22 10:08 ` Niklas Holsti
2011-12-22 12:23 ` Simon Wright
2011-12-23 1:26 ` Randy Brukardt
2011-12-23 6:18 ` Jeffrey Carter
2011-12-22 11:40 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox