Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!aramis.rutgers.edu!topaz.rutgers.edu!police.rutgers.edu!andrewsr From: andrewsr@police.rutgers.edu (Richard L Andrews) Newsgroups: comp.lang.c Subject: #define OR || Message-ID: Date: 24 Jan 90 15:40:19 GMT References: <5940014@hpcupt1.HP.COM> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 23 Being new to C I have a few questions which must have been addressed before in this newsgroup. If someone has the previous stuff I would really appreciate an E-mail. Thanks. Ok, I have read K&R (II) and Koenig's C Traps and Pitfalls. I know that a potential problem in coding is the mixup of `&' and `&&' (and `|' and `||' etc). Now, what is potentially wrong with: #define AND && #define OR || #define EQ == It seems to me that when reading code this is what I do anyway. Ex. if (a && b) => if (a AND b) I do not advocate #defining code until it looks different (aka making C look like pascal), but this seems harmless. Also, just to open a bag of worms, what other books do people recommend? (And not beginner stuff). -- // Richard L Andrews II |"Like any good philosophical discussion, the \X/ andrewsr@topaz.rutgers.edu| conclusion is left unresolved." -McLaughlin