comp.lang.ada
 help / color / mirror / Atom feed
From: Marius Amado Alves <amado.alves@netcabo.pt>
To: comp.lang.ada@ada-france.org
Subject: Re: Problems with Ada.Text_IO and strings.
Date: Wed, 15 Oct 2003 17:23:40 +0000
Date: 2003-10-15T17:23:40+00:00	[thread overview]
Message-ID: <mailman.94.1066291539.25614.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <mL5jb.3237$Z_2.269599@news20.bellglobal.com>

On Wed, 2003-10-15 at 06:25, CheGueVerra wrote:
> It's still not clear for me how to make sure, that when I have a String
> let's say:
> 
> S1 : String(1..10);
> 
> How can I make sure that the String that I will receive and treat will be of
> length 10 or less..

S1 has length 10, period. It is an array. How you do what you want
depends of your end of data condition. If it is end of line use
Get_Line. If it is end of file use a loop testing for End_Of_File. Etc.
In any case record how many characters were read and then use the slice
S1 (1 .. How_Many).




  parent reply	other threads:[~2003-10-15 17:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13 22:23 Problems with Ada.Text_IO and strings Bleakcabal
2003-10-13 23:51 ` Larry Hazel
2003-10-14  0:06 ` Chad R. Meiners
2003-10-14 12:32   ` Bleakcabal
2003-10-14 15:03     ` Robert I. Eachus
2003-10-14 15:16       ` Stephane Richard
2003-10-14 20:16         ` Jeffrey Carter
2003-10-14  1:29 ` Jeffrey Carter
2003-10-14 12:39   ` Bleakcabal
2003-10-14 12:57     ` sk
2003-10-14 14:14     ` Problems with Ada.Text_IO and strings. (wants EOL character) Larry Kilgallen
2003-10-14 16:20       ` Stephen Leake
2003-10-14 16:45         ` Stephane Richard
2003-10-14 20:19     ` Problems with Ada.Text_IO and strings Jeffrey Carter
2003-10-14 12:33 ` Bleakcabal
2003-10-15  6:25 ` CheGueVerra
2003-10-15 14:41   ` Martin Krischik
2003-10-15 19:50     ` CheGueVerra
2003-10-15 22:00       ` Ludovic Brenta
2003-10-16  1:19         ` Jeffrey Carter
2003-10-15 23:39       ` Chad R. Meiners
2003-10-19  7:36         ` Martin Krischik
2003-10-19 19:24           ` Chad R. Meiners
2003-10-15 17:23   ` Marius Amado Alves [this message]
2003-10-16  2:29   ` Steve
2003-10-16  5:51     ` CheGueVerra
2003-10-16  9:51       ` CheGueVerra
replies disabled

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