getch() and getche() in MSC 4.0

Chris Torek chris at mimsy.UUCP
Sat Oct 22 01:49:28 AEST 1988


In article <7594 at bloom-beacon.MIT.EDU> scs at athena.mit.edu (Steve Summit)
writes:
>     1. Parenthesize fully, inside and out
>     2. Use capital letters in the name, to remind the reader
>	 it's a macro and may therefore act weird
>     3. Make every effort not to repeat "arguments," so that
>	 side effects aren't replicated

Actually, these are all good arguments for an `inline' keyword, a la
C++.  It is worth noting that GCC has an inline keyword, and one can
write, e.g.,

	inline int toupper(int c) {
		return (islower(c) ? _toupper(c) : c);
	}
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list