Path: utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!ucsd!usc!cs.utexas.edu!uunet!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!osiris.cso.uiuc.edu!gordon From: gordon@osiris.cso.uiuc.edu (John Gordon) Newsgroups: comp.lang.c Subject: Re: Assignment in test: OK? Message-ID: <1990Sep7.042759.3804@ux1.cso.uiuc.edu> Date: 7 Sep 90 04:27:59 GMT References: <1990Sep5.185451.25532@DRD.Com> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 15 One way to avoid the =/== pitfall is to write your code like this: if(7 == x) rather than if(x == 7). If you write it the first way, and accidentally write = instead of ==, you will be trying to assign a value to a constant (!!) and will get an error. --- John Gordon Internet: gordon@osiris.cso.uiuc.edu #include gordon@cerl.cecer.army.mil #include GEnie: j.gordon14