Path: utzoo!attcan!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c Subject: Re: Assignment in test: OK? Message-ID: <456@taumet.com> Date: 18 Sep 90 14:51:22 GMT References: <1990Sep12.194753.9808@laguna.ccsf.caltech.edu> <3749@goanna.cs.rmit.oz.au> <1990Sep13.230805.19720@laguna.ccsf.caltech.edu> <14316:Sep1511:00:2390@kramden.acf.nyu.edu> <1990Sep17.220836.11501@laguna.ccsf.caltech.edu> Organization: Taumetric Corporation, San Diego Lines: 21 bruce@seismo.gps.caltech.edu (Bruce Worden) writes: >In article <14316:Sep1511:00:2390@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >... I was assuming that people writing `if(x = y)' >and meaning `if(x == y)' were just making some mechanical error. It has >been brought to my attention, however, that the problem may be caused by a >confusion of the `=' symbol in C with that of some other language, by >someone who regularly programs in multiple languages. I sometimes switch between Pascal and C/C++ several times in one day, and it is a bit confusing. It isn't that I don't "know" (or that I "forget") the different versions of assignment and comparison operators. It is more a question of "shifting gears" fully. I find it is like switching between text editors, or between similar musical instruments. Habits carry over, and it takes a little time (minutes or hours) to fully move into the new mode. The problem is worse if I am tired or distracted. -- Steve Clamage, TauMetric Corp, steve@taumet.com