Path: utzoo!utgpu!watmath!clyde!att!whuts!homxb!hound!rkl1 From: rkl1@hound.UUCP (K.LAUX) Newsgroups: comp.lang.c Subject: Re: down Message-ID: <2803@hound.UUCP> Date: 12 Dec 88 18:22:37 GMT References: <45370@yale-celray.yale.UUCP> Organization: AT&T Bell Laboratories, Holmdel Lines: 23 In article <45370@yale-celray.yale.UUCP>, wald-david@CS.YALE.EDU (david wald) writes: > In article slores%gables.span@umigw.miami.edu (Stanislaw L. Olejniczak) writes: > >PLEASE don't flame for posting too simple a question. I think the following > >SHOULD work, but will not even compile: > > while ( (c = getchar) != EOF) > > chcnt++ += (c == '\n'); > > Flame? Us? Never. > > You can't assign to a ++ expression. > Of course you can! For example, a simple string copy function: copy_string (from, to) char *from; char *to; { while (*to++ = *from++) ; } --rkl