home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 12958 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.0 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!lll-winken!ames!sun-barr!cs.utexas.edu!wupost!darwin.sura.net!eng.ufl.edu!whale!zzang
  2. From: zzang@whale.uucp (Zhuo Zang[~{j0WA~}])
  3. Newsgroups: comp.lang.c
  4. Subject: Kwik escape from recursive loop, Possible?
  5. Message-ID: <1992Aug29.221941.20788@eng.ufl.edu>
  6. Date: 29 Aug 92 22:19:41 GMT
  7. Sender: news@eng.ufl.edu (Usenet Diskhog System)
  8. Distribution: usa
  9. Organization: University of Florida
  10. Lines: 19
  11.  
  12. Hello,
  13. I am writing a program.
  14. In the program, I use a 'while (c!=EOF)' statement to write char.
  15. I also have a recursive call to get input char in the program,
  16. this caused problem. the recursive call piles
  17. up a huge stack when the c finally reaches the EOF;
  18. then it returns one by one, so my output file
  19. ended with many(48 in one eg.) EOF's (the 0xff in DOS).
  20.  
  21. my question is: is it possible to escape from
  22. the loop immediately without returning the garbages 
  23. once c reaches the EOF ?
  24.  
  25. Many thanks in advance !
  26.  
  27. -- 
  28. Zhuo Zang[~{j0WA~}]
  29.  
  30. University of Florida            Email: zzang@stat.ufl.edu
  31.