Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!apple!sun-barr!newstop!texsun!texbell!nuchat!moray!urchin!p6.f506.n106.z1.fidonet.org!Bob.Stout From: Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) Newsgroups: comp.lang.c Subject: common bugs in C programs Message-ID: <7140.25959377@urchin.fidonet.org> Date: 24 Dec 89 00:27:46 GMT Sender: ufgate@urchin.fidonet.org (newsout1.26) Organization: FidoNet node 1:106/506.6 - Fulcrum's Edge, Spring TX Lines: 10 In an article of <22 Dec 89 03:33:00 GMT>, damerla@uicbert.eecs.uic.edu writes: >I am compiling a list of syntax and logical errors I ever made while writing >C programs. Some of these errors are very simple but hard to debug like >typing = in place of ==. Till now I have compiled about 25 of them and any >contributions to this list will be appreciated. If you make it a matter of style to write conditionals as (const == var) rather than (var == const), your compiler will flag the error for you and make your code *much* easier to debug.