From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: printf bug ??? Date: Tue, 09 Jun 1998 18:33:41 -0400 Organization: Two pounds of chaos and a pinch of salt. Lines: 20 Message-ID: <357DB845.CDA12E28@cs.com> References: <35784F8A DOT AB5D79CC AT gpu DOT srv DOT ualberta DOT ca> <35789F02 DOT 1EF059F7 AT alcyone DOT com> NNTP-Posting-Host: ppp107.cs.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Erik Max Francis wrote: > > *p++ = getchar(s); > > are undefined. "Undefined," by the ANSI standard, means that _no_ > restrictions are imposed -- crashing or emailing the President of the > United States is perfectly ANSI compliant. Slight modification here: that last expression _is_ defined, because p is postfix-incremented only once in the entire expression. The return value from getchar() will be stored in *p, and then p will be incremented. Also, getchar() doesn't take any parameters. -- --------------------------------------------------------------------- | John M. Aldrich | "Autocracy is based on the assumption| | aka Fighteer I | that one man is wiser than a million | | mailto:fighteer AT cs DOT com | men. Let's play that over again, | | http://www.cs.com/fighteer | too. Who decides?" - Lazarus Long | ---------------------------------------------------------------------