>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >On Behalf Of Neil Baylis >Sent: 29 June 2007 15:12 >To: Microcontroller discussion list - Public. >Subject: Re: [PIC] Receiving Infrared and common problems with >engineers. > > >On 6/29/07, Michael Rigby-Jones > wrote: >> >> But it's syntacticly correct, even if it's poor style. I don't know >> of a compiler that will complain because a magic number was used >> instead of a defined symbol. > >I never said anything about whether or not it was >syntactically correct. I said it was a more egregious error. >In my world, any error caught by the compiler is trivial, >because the code will fail to build. (This goes for warnings >as well.) But this is an error that can cause severe >difficulties, and is not caught by the compiler. If it gets >through the code review, it can take months or years to cause trouble. > >To label it as 'poor style' is to trivialize it, to put it in >the same league as indentation, or whether you put a space after a '('. I'm not trivialising it. Perhaps "poor coding practice" is a better description than "poor style", and then only within a full application. If someone posts a trival code example for comment, then including all the literal definitions for such things as array sizes is neither required nor desirable IMO. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist