Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!fozzie!stanley From: stanley@fozzie.UUCP (John Stanley) Newsgroups: comp.lang.c Subject: Re: Is there a good example of how toupper() works? Message-ID: Date: 19 Oct 90 21:41:57 GMT References: <859@agcsun.UUCP> Organization: One Man Brand Lines: 17 jackm@agcsun.UUCP (Jack Morrison) writes: > > (or for anal types, :-) > while (*duh != '\0') { > Or, for even less possibility for screw-ups: while ( '\0' != *duh ) { The reason for the order becomes clearer in equality testing, when the compiler will complain about ( '\0' = *duh ) and not ( *duh = 0 ). It is real easy to catch a == vs. = problem this way. This is my signature. It doesn't contain my name at all!