C Style

Eric C. Brown brownc at utah-cs.UUCP
Sat Sep 14 01:57:12 AEST 1985


In article <180 at chinet.UUCP> rlk at chinet.UUCP (Richard L. Klappal) writes:
>	Which of the following code segments is more understandable,
>	(readable, structured, etc) given the current attitudes
>	about the presence of goto's in programming?
>

Well, neither.
how about
	for ( ch = getch(); ch < '1' || ch > '5') && ch != 'E'); ch = getch())
		putchar(BELL);
	addch(ch);
	refresh();
which ought to do the same thing.

Eric C. Brown
brownc at utah-cs
..!{decvax, ihnp4}!utah-cs!brownc



More information about the Comp.lang.c mailing list