Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!agtoa!greyfox From: greyfox@agtoa.UUCP (Bruce Ide) Newsgroups: comp.lang.c Subject: Re: The final word on GOTO (Don't I wis Message-ID: <33@agtoa.UUCP> Date: 24 Oct 89 13:39:17 GMT References: <20324@<1989Sep14| <225800222@uxe.cso.uiuc.edu| <4208@cbnewsh.ATT.COM| <1657@l.cc.purdue.edu> Distribution: na Organization: Post Time Publications, Shorter, AL Lines: 24 Basic programmers use GOTO's excessively. I usually never use any, but if you are nested four loops deep and need to get all the way out, you can either use a GOTO or set a condition and test it four times. In cases such as this, the GOTO is the Logical Choice. The examples I have seen here: >case 1: > command(); > break; as opposed to >case 1: > goto command; > break; I wouldn't use a GOTO here. Putting a goto here would be something a BASIC programmer would do. When your program gets > 20K or so, keeping track of global variables and GOTO's is a MAJOR pain. You'll know that when the guy who has to maintain it after you're gone comes after you with a shot gun. (I like local arrays of structures and pointers to functions too. Keeps the code portable :-) -Bruce Ide (Grey Fox) uunet!agtoa!greyfox