One more point regarding = and == (more flamage)

Duane Richard LaMont lamont at uts.amdahl.com
Sun Mar 31 14:34:12 AEST 1991


In article <15634 at smoke.brl.mil> Doug Gwyn writes:
>>toupper.c:    while ( (int) (c = getchar()) != EOF )
>
>I hope you noticed that there is a bug there.

I give up.  What's the bug?

I gave it the benefit of the doubt and assumed that 'c' was already
an int and that the cast was redundant.


Rick LaMont



More information about the Comp.lang.c mailing list