Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!alberta!myrias!cg From: cg@myrias.UUCP (Chris Gray) Newsgroups: comp.lang.c Subject: = vs == Summary: It CAN be a problem Message-ID: <547@myrias.UUCP> Date: 19 Jan 88 18:21:00 GMT Reply-To: cg@myriasa.UUCP (Chris Gray) Organization: Myrias Research Corporation Lines: 18 I am one of the people who have trouble with accidentally using = instead of ==. (I once actually used == instead of = in an assignment statement too.) My problem is not lack of experience with C - I've used it for 10 years or so, and have written tens of thousands of lines of C, including an ANSI C compiler. My problem stems from the fact that I also program at home on my Amiga, using a compiler of my own (Draco), which uses = for comparison and := for assignment. Thus, I switch back and forth between the two styles on a daily basis. My hardest day is monday, after a whole weekend of using the other style. I don't have problems going in the other direction because the compiler at home is helpful and points out my silliness to me, unlike the C compiler at work which blithely ignores it. I'll be glad when we switch to our own target machines for development, so that I can use our compiler, which by default warns of those cases which appear dubious (the true C hacker will of course make an alias to disable that option). -- Chris Gray Myrias Research, Edmonton +1 403 428 1616 {uunet!mnetor,ubc-vision,watmath,vax135}!alberta!myrias!cg