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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7e5c1cdfd5d69f55 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: File I/O Problem/Question Date: 1997/06/12 Message-ID: <33A014EB.423@gsfc.nasa.gov>#1/1 X-Deja-AN: 247903205 References: <01bc772c$238c60c0$LocalHost@jcmarle> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.ada Date: 1997-06-12T00:00:00+00:00 List-Id: Jim Marley wrote: > > while not eof > get_line(file, string, last) > > while not eol > get(file, int) > end loop -- eol > end loop -- eof > The program reads in the first string and first set of ints, it goes back > to the top (inside the "while not eof"), skips the get_line and tries to > "get" another int - causing a data exception because it's looking another > string. You need a Skip_Line after the second loop. Get (int) never reads the line terminator, so the Get_Line read the line terminator of the "int int" line, returning an empty string. -- - Stephe