> I need your opinion in the case of battle with the software QA department. > They are saying GOTO in C not acceptable. > I checked the books, some of them said no, some of them saying in some > places there is a use for GOTO. > My practice said, when writing code for PIC especially fast operation with > nested loops > ( like decoding noise RF Manchester transmission at 100 kbit/s ) GOTO is > absolutely necessary. > Any thought on that issue? Sounds like someone is losing sight of the real goal here. The original motivation for not using GOTOs was that block stuctured code is easier to follow and to maintain. All other things being equal, this is true. But there are many other factors that contribute to making code easy to follow and maintain, with good block and end of line comments being top of the list. Perfect block structuring will never make up for poor design and documentation. I believe there are also cases where properly used GOTOs can even enhance understandability. Although it is theoretically possible, not all program flows are best expressed in block structure form. There are also definite execution speed advantages in some special circumstances, though that is not an issue except in the relatively rare code that is speed-critical. I use block structures as much as possible in high level language code, but do use GOTOs when I think it simplifies the code. Of course any label that is a target of a goto should have a good comment associated with it that explains why execution might get here other than by falling thru. In short, I think your QA people are being small minded paper pushing weenies. They are probably just following rules that they don't understand the reasons behind. This reminds my why I don't want to be an employee at a large company. ***************************************************************** Olin Lathrop, embedded systems consultant in Devens Massachusetts (978) 772-3129, olin@cognivis.com, http://www.cognivis.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST