From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d0fa2610a6bea4ec X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Nested declares, constant size arrays and clarity References: <87641n92tc.fsf@ludovic-brenta.org> <87zlyz6rnt.fsf@ludovic-brenta.org> <1bykilw2jy8k3.1p7sr9xc5wl7i.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1191560457 12.201.97.213 (Fri, 05 Oct 2007 05:00:57 GMT) NNTP-Posting-Date: Fri, 05 Oct 2007 05:00:57 GMT Organization: AT&T ASP.att.net Date: Fri, 05 Oct 2007 05:00:57 GMT Xref: g2news2.google.com comp.lang.ada:2314 Date: 2007-10-05T05:00:57+00:00 List-Id: 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