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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,deffa8e94c074959 X-Google-Attributes: gid103376,public From: Matthew J Heaney Subject: Re: Trouble with TEXT_IUO on WinNT Date: 2000/07/13 Message-ID: <7r4s5uhyx2.fsf@butter.albany.duck.com>#1/1 X-Deja-AN: 645945716 Sender: mheaney@butter.albany.duck.com References: <395C97C9.43607F8E@icn.siemens.de> X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 963503565 208.136.9.227 (Thu, 13 Jul 2000 08:52:45 PDT) Organization: EarthLink Inc. -- http://www.EarthLink.net NNTP-Posting-Date: Thu, 13 Jul 2000 08:52:45 PDT Newsgroups: comp.lang.ada Date: 2000-07-13T00:00:00+00:00 List-Id: Alfred Hilscher writes: Don't use End_Of_Line. To determine whether you've read all of the current line, do this: Line : String (1 .. 255); Last : Natural; begin Get_Line (Line, Last); if Last < Line'Last then --yes, we've read the entire line else --no, we have not read the entire line end if; To iterate through a file comprising lines of text, where the maximum length of lines isn't known, then you can do this: declare function Get_Line return String is Line : String (1 .. 256); Last : Natural; begin Get_Line (Line, Last); if Last < Line'Last then return Line (1 .. Last); else return Line & Get_Line; end if; begin while not End_Of_File loop declare Line : constant String := Get_Line; begin end; end loop; end; If you don't understand why you shouldn't use End_of_Line, then surf the AdaPower website for the article I wrote re the "Get_Line mystery."