home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!lll-winken!ames!sun-barr!cs.utexas.edu!wupost!darwin.sura.net!eng.ufl.edu!whale!zzang
- From: zzang@whale.uucp (Zhuo Zang[~{j0WA~}])
- Newsgroups: comp.lang.c
- Subject: Kwik escape from recursive loop, Possible?
- Message-ID: <1992Aug29.221941.20788@eng.ufl.edu>
- Date: 29 Aug 92 22:19:41 GMT
- Sender: news@eng.ufl.edu (Usenet Diskhog System)
- Distribution: usa
- Organization: University of Florida
- Lines: 19
-
- Hello,
- I am writing a program.
- In the program, I use a 'while (c!=EOF)' statement to write char.
- I also have a recursive call to get input char in the program,
- this caused problem. the recursive call piles
- up a huge stack when the c finally reaches the EOF;
- then it returns one by one, so my output file
- ended with many(48 in one eg.) EOF's (the 0xff in DOS).
-
- my question is: is it possible to escape from
- the loop immediately without returning the garbages
- once c reaches the EOF ?
-
- Many thanks in advance !
-
- --
- Zhuo Zang[~{j0WA~}]
-
- University of Florida Email: zzang@stat.ufl.edu
-