Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!rutgers!aramis.rutgers.edu!paul.rutgers.edu!sparky.rutgers.edu!gaynor From: gaynor@sparky.rutgers.edu (Silver) Newsgroups: comp.lang.c Subject: Re: Assignment in test: OK? Message-ID: Date: 14 Sep 90 14:39:44 GMT References: <1990Sep12.194753.9808@laguna.ccsf.caltech.edu> <3749@goanna.cs.rmit.oz.au> <1698@m1.cs.man.ac.uk> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 11 I don't have any problems with the concept of performing assignments and other destructive things in conditionals. The only reason why people question the practice in C is because the stupid equality and assignment operators appear so similar. If I had my way, assignment would be `<-' and equality, `='. Hmm... Given the relationships between &/&&/&= and |/||/|=, `=' should probably be bitwise equality (i.e., `a == b' would be equivalent to `~(a ^ b)'), `==' should probably be logical equality, and `=<-' should probably apply to the bitwise version. But I could imagine people messing up that even worse than the current set-up. Regards, [Ag]