Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!mit-eddie!uw-beaver!tektronix!tekgen!tekred!mikec From: mikec@tekred.TEK.COM (Mike Combs) Newsgroups: comp.lang.c Subject: Re: goto's in C: an opinion... Message-ID: <1422@tekred.TEK.COM> Date: Thu, 23-Jul-87 13:38:17 EDT Article-I.D.: tekred.1422 Posted: Thu Jul 23 13:38:17 1987 Date-Received: Sat, 25-Jul-87 11:22:35 EDT References: <3289@bigburd.PRC.Unisys.COM> Reply-To: mikec@tekred.TEK.COM (Mike Combs) Followup-To: <7571@beta.UUCP> Distribution: world Organization: Tektronix, Inc., Beaverton, OR. Lines: 33 In article <7571@beta.UUCP> you write: ]In article <3289@bigburd.PRC.Unisys.COM>, weiss@bigburd.PRC.Unisys.COM (Tom Weiss) writes: ]> Since C provides the break statement to break out of a loop, the ]> continue statement to jump back to the top of a loop, the return ]> statement to immediately exit a function, and access to system calls ]> (e.g. exit) that can terminate execution in error handling functions, ]> there are few 'legitimate' uses for goto. ] ]In any language that supports a complete set of structured constructs, ]there is NO NEED for a goto, and the statement should be removed from ]the language! ]Languages that do not have enough control structure should be used only ]with a pre-processor (e.g. Fortran and Ratfor). ] ] Skip Egdorf ] hwe@lanl.gov What would you say a "complete set of structured constructs" includes? Does Pascal have a complete set? I'm a longtime Pascal programmer, and just starting to learn C. Pascal does not have the break, continue, or return statements. In your opinion, in the cases Weiss refers to, does this justify use of goto? -- Mike A. Combs ^--The "A" is for: "Almost finished debugging." GEnie: mike.combs MCI: mcombs tektronix!tekgen!tekred!mikec terrorist, contras, drugs, Iran, secret, NSA, CIA <- NSA line-eater food :-( -- Mike A. Combs ^--The "A" is for: "Almost finished debugging." GEnie: mike.combs MCI: mcombs tektronix!tekgen!tekred!mikec terrorist, contras, drugs, Iran, secret, NSA, CIA <- NSA line-eater food :-(