Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: getch() and getche() in MSC 4.0 Message-ID: <14094@mimsy.UUCP> Date: 21 Oct 88 15:49:28 GMT References: <10508@dartvax.Dartmouth.EDU> <7594@bloom-beacon.MIT.EDU> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 In article <7594@bloom-beacon.MIT.EDU> scs@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@mimsy.umd.edu Path: uunet!mimsy!chris