comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: File I/O Problem/Question
Date: 1997/06/12
Date: 1997-06-12T00:00:00+00:00	[thread overview]
Message-ID: <33A014EB.423@gsfc.nasa.gov> (raw)
In-Reply-To: 01bc772c$238c60c0$LocalHost@jcmarle


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




      parent reply	other threads:[~1997-06-12  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-12  0:00 File I/O Problem/Question Jim Marley
1997-06-12  0:00 ` Anonymous
1997-06-12  0:00 ` Stephen Leake [this message]
replies disabled

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