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,7e5c1cdfd5d69f55,start X-Google-Attributes: gid103376,public From: "Jim Marley" Subject: File I/O Problem/Question Date: 1997/06/12 Message-ID: <01bc772c$238c60c0$LocalHost@jcmarle>#1/1 X-Deja-AN: 247865241 Organization: Posted via CAIS Internet Newsgroups: comp.lang.ada Date: 1997-06-12T00:00:00+00:00 List-Id: This is probably a simple problem, but I'm refreshing my knowledge of Ada and it seems that I've forgotten more than I thought. Problem: I'm reading in a sequential text file, consisting of strings and integers. The file format is as follows: string (variable length) int int int int int (any number of integers) string int int int... .. and so on. I have it set up in two While loops (1. While not EOF, 2. While not EOL) - here's the sudo code: 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. Please let me know what I'm forgetting to do - and why it skips past the get_line on the second pass. Tks Jim Marley