Assignment in test: OK?
Stephen Clamage
steve at taumet.com
Wed Sep 19 00:51:22 AEST 1990
bruce at seismo.gps.caltech.edu (Bruce Worden) writes:
>In article <14316:Sep1511:00:2390 at kramden.acf.nyu.edu> brnstnd at 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 at taumet.com
More information about the Comp.lang.c
mailing list