comp.lang.ada
 help / color / mirror / Atom feed
From: "tr00per" <tr00per@o2.pl>
Subject: Re: Strings and errors... (gnat)
Date: 29 Nov 2006 09:57:37 -0800
Date: 2006-11-29T09:57:37-08:00	[thread overview]
Message-ID: <1164823057.036164.238000@h54g2000cwb.googlegroups.com> (raw)
In-Reply-To: <wccmz6aywo5.fsf@shell01.TheWorld.com>


Robert A Duff napisal(a):
> You can't assign a shorter string into a longer one -- the lengths have
> to match.  You could do:
>
>     tmp: String := buf(13..26);
>
> or
>
>     tmp: constant String := buf(13..26);
>
> and it will take the bounds for tmp from buf(13..26).
>
> Or, you could use Unbounded_Strings.
>
> - Bob

Actual length of the string is dependend on other data, range here is
for example, so these declarations aren't solution for me, but thanks
anyway. Maybe there is a ready-to-use function for splitting the string
by template, so I don't have to reinvent the wheel?
I have input in format String:String:String. I want to get rid of these
colons and get three seperate strings.




  reply	other threads:[~2006-11-29 17:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 17:30 Strings and errors... (gnat) tr00per
2006-11-29 17:44 ` Robert A Duff
2006-11-29 17:57   ` tr00per [this message]
2006-11-29 18:10     ` Ludovic Brenta
2006-11-30 11:36       ` Georg Bauhaus
2006-11-30  2:04   ` jimmaureenrogers
2006-12-01  8:39 ` Martin Krischik
2006-12-01 19:39   ` [solved] tr00per
  -- strict thread matches above, loose matches on Subject: below --
2006-11-29 17:57 Strings and errors... (gnat) Benjamin Place
2006-11-30  6:16 ` Jeffrey R. Carter
replies disabled

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