home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / ada / 2518 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!lynx!nmsu.edu!opus!pat
  3. From: pat@summit.opus (pat gioannini)
  4. Subject: Re: ADA help Urgently Requested..Please!!!!
  5. In-Reply-To: mgeorgy@vmsclst1.sc.csupomona.edu's message of 1 Sep 92 21:10:14 PDT
  6. Message-ID: <PAT.92Sep2162706@summit.opus>
  7. Sender: usenet@nmsu.edu
  8. Organization: /home/pat/.organization
  9. References: <1992Sep1.211014.1@vmsclst1.sc.csupomona.edu>
  10. Date: Wed, 2 Sep 1992 23:27:06 GMT
  11. Lines: 28
  12.  
  13.  
  14.  
  15. Your problem has to do with the get( selection ) not absorbing the
  16. end of line.  You are probably answering the prompt by entering 
  17. a 1 followed by a return.  So the next 
  18. get_line( in_file_name, input_line_length ) reads to the end of line.  
  19. This causes input_line_length to be 0.  The open is now trying to open
  20. for input only a temparary file which is not good.  A quick hack could be 
  21. something like
  22.  
  23.     get( selection );
  24.     if not end_of_line then
  25.         get_line( dummy, dummy_last );
  26.     end if;
  27.     if selection = 1 then 
  28.     ...
  29.  
  30. If someone else would like to give a more lucid explaination of
  31. end_of_line / end_of_file and how file io should be done I would
  32. be happy to read it.
  33.  
  34.  
  35. Hope this helps
  36.  
  37. --
  38. pat gioannini
  39. pat@psl.nmsu.edu
  40.  
  41.