Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!eos!labrea!decwrl!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsb!kenny From: kenny@uiucdcsb.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: Put your code... (was Re: gotos Message-ID: <165600047@uiucdcsb> Date: 27 Apr 88 18:32:00 GMT References: <2597@ttrdc.UUCP> Lines: 25 Nf-ID: #R:ttrdc.UUCP:2597:uiucdcsb:165600047:000:747 Nf-From: uiucdcsb.cs.uiuc.edu!kenny Apr 27 13:32:00 1988 I made an error in Part 2 of my recent posting on this subject. I left out the ungetc() (which is the key to the whole procedure!) in the sample C version of Knuth's Example 5. The code to handle '/' should look like: case '/': if ((c = getchar ()) == '/') { putchar ('\n'); column = 0; } else { ungetc (c); column = tabulate (column); } break; It beats me how I let that particular gaffe slip through, but I humbly and contritely apologize to anyone that I confused with it. Kevin Kenny UUCP: {ihnp4,pur-ee,convex}!uiucdcs!kenny Department of Computer Science ARPA: kenny@B.CS.UIUC.EDU (kenny@UIUC.ARPA) University of Illinois CSNET: kenny@UIUC.CSNET 1304 W. Springfield Ave. Urbana, Illinois, 61801 Voice: (217) 333-6680