home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!lynx!nmsu.edu!opus!pat
- From: pat@summit.opus (pat gioannini)
- Subject: Re: ADA help Urgently Requested..Please!!!!
- In-Reply-To: mgeorgy@vmsclst1.sc.csupomona.edu's message of 1 Sep 92 21:10:14 PDT
- Message-ID: <PAT.92Sep2162706@summit.opus>
- Sender: usenet@nmsu.edu
- Organization: /home/pat/.organization
- References: <1992Sep1.211014.1@vmsclst1.sc.csupomona.edu>
- Date: Wed, 2 Sep 1992 23:27:06 GMT
- Lines: 28
-
-
-
- Your problem has to do with the get( selection ) not absorbing the
- end of line. You are probably answering the prompt by entering
- a 1 followed by a return. So the next
- get_line( in_file_name, input_line_length ) reads to the end of line.
- This causes input_line_length to be 0. The open is now trying to open
- for input only a temparary file which is not good. A quick hack could be
- something like
-
- get( selection );
- if not end_of_line then
- get_line( dummy, dummy_last );
- end if;
- if selection = 1 then
- ...
-
- If someone else would like to give a more lucid explaination of
- end_of_line / end_of_file and how file io should be done I would
- be happy to read it.
-
-
- Hope this helps
-
- --
- pat gioannini
- pat@psl.nmsu.edu
-
-