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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,49f7dd1bad1910ff X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-16 01:06:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!skynet.be!skynet.be!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: Problems with Ada.Text_IO and strings. Date: Wed, 15 Oct 2003 17:23:40 +0000 Organization: Cuivre, Argent, Or Message-ID: References: <8336eb21.0310131423.7410e1ec@posting.google.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1066291540 45223 80.67.180.195 (16 Oct 2003 08:05:40 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 16 Oct 2003 08:05:40 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: X-Mailer: Ximian Evolution 1.4.5 X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:951 Date: 2003-10-15T17:23:40+00:00 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).