comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: Nested declares, constant size arrays and clarity
Date: Fri, 05 Oct 2007 05:00:57 GMT
Date: 2007-10-05T05:00:57+00:00	[thread overview]
Message-ID: <dyjNi.118716$Xa3.32144@attbi_s22> (raw)
In-Reply-To: <fe2p43$gn7$1@nemesis.news.tpi.pl>

Mateusz Papiernik wrote:
> 
> The string format is known, its always three columns - but of unknown 
> width (in some boundaries, of course, let's say - 100).

No boundaries can easily be accomodated. See function 
Ada.Text_IO.Get_Line if you're using Ada 07, or you should be able to 
easily write your own if you're not.

> I used Unbounded Strings to slice my input by semicolon sign once, then 
> slice the rest, and then slice the rest of the rest. I guess I can do 
> the same with a simple loop over traditional string to check semicolon 
> positions and then simply slice the string with known left/right 
> boundaries. Back to code then... :)

Rather than looping to find positions, you might want to look at 
Ada.Strings.Fixed.Index, which does it for you ...

-- 
Jeff Carter
"Why, the Mayflower was full of Fireflies, and a few
horseflies, too. The Fireflies were on the upper deck,
and the horseflies were on the Fireflies."
Duck Soup
95



  reply	other threads:[~2007-10-05  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 22:58 Nested declares, constant size arrays and clarity Mateusz Papiernik
2007-10-03 23:49 ` Ludovic Brenta
2007-10-04  8:49   ` Mateusz Papiernik
2007-10-04 11:33     ` Ludovic Brenta
2007-10-04 12:45       ` Dmitry A. Kazakov
2007-10-04 13:11         ` Mateusz Papiernik
2007-10-05  5:00           ` Jeffrey R. Carter [this message]
2007-10-05  4:58         ` Jeffrey R. Carter
2007-10-05  7:38           ` Dmitry A. Kazakov
2007-10-05 17:08             ` Jeffrey R. Carter
2007-10-05  4:54     ` Jeffrey R. Carter
2007-10-04  0:20 ` Jeffrey R. Carter
2007-10-04  8:51   ` Mateusz Papiernik
2007-10-05  2:45     ` Steve Whalen
2007-10-04  0:23 ` anon
replies disabled

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