Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stl!stc!rmj From: rmj@tcom.stc.co.uk (The Beardless Wonder) Newsgroups: comp.lang.c Subject: Re: Error Handling Message-ID: <2042@jura.tcom.stc.co.uk> Date: 3 Oct 90 12:04:37 GMT References: <837@babcock.cerc.wvu.wvnet.edu> <703@VAX1.CC.UAKRON.EDU> Reply-To: rmj@htc2.UUCP (The Beardless Wonder) Organization: STC Telecomms, Harlow Technical Centre, Harlow Lines: 37 In article <703@VAX1.CC.UAKRON.EDU> r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) writes: > >I have to agree, those who flame your (or my) use of GOTOs should try to >program on an 8088 or a 6502 based machine in assembly. These programmers >know how nice GOTOs are (since often no nice alts exist). With respect, I have spent several months now decoding and documenting a rather large semi-differentiated lump 8086 assembler, and respectfully submit that at least some assembler programmers wouldn't know "nice" features of code if they came up and punched them in the face. The code I have been facing is just barely structured (some of the time), hard to read, badly commented and sometimes written very "creatively". GOTOs, with one major exception, are the least of its problems. >Although I do not feel that GOTOs should be over used. Since C (and PASCAL) >provide reasonable looping controls and if statements, the need for GOTOs >declines nicely. I concur. With that sort of looping control it is usually easy to get some idea of where the code goes at a glance, even though its purpose may be unclear. With the assembler I have haunting my nightmares :-), it is usually impossible to tell where the control flow goes until after the code is flowcharted, and even then it can give you a real headache. I don't say that GOTOs should never be used; occasionally they are the most appropriate thing. Overused, they make your code very hard to read. Rhodri >----------------------------------------------------------------------------- >r3jjs@vax1.cc.uakron.edu -- * Windsinger * "But soft, what light through yonder * rmj@islay.tcom.stc.co.uk * airlock breaks?" * rmj@tcom.stc.co.uk * --RETURN TO THE FORBIDDEN PLANET * rmj10@phx.cam.ac.uk * You've gotta be cruel to be Khund!