Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!mit-eddie!ll-xn!ames!oliveb!pyramid!fmsrl7!grazier
From: grazier@fmsrl7.UUCP (Kevin Grazier)
Newsgroups: comp.lang.c
Subject: Re: goto's in C: an opinion...
Message-ID: <960@fmsrl7.UUCP>
Date: Fri, 24-Jul-87 13:27:57 EDT
Article-I.D.: fmsrl7.960
Posted: Fri Jul 24 13:27:57 1987
Date-Received: Sat, 25-Jul-87 15:18:03 EDT
References: <3289@bigburd.PRC.Unisys.COM> <7571@beta.UUCP> <765@haddock.ISC.COM>
Reply-To: grazier@fmsrl7.UUCP (Kevin Grazier)
Organization: Ford Motor Company, Scientific Research Labs, Dearborn, MI
Lines: 39
Keywords: C, goto, style

In article <7571@beta.UUCP> hwe@beta.UUCP (Skip Egdorf) writes:
>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!

For what it's worth, I don't entirely agree.   Take, for instance, code
which is time-critical (control systems software, for example).  Now, 
add nested switch statements.  When the code is executed at the "lowest
level" of the switch, it's so much more practical to jump to the end
of the swithces instead of executing the break break break.......ad infinitum 
sequence.  When you're running real-time code which is running something like
an engine, you look for speed ANYWHERE.  This is another case in which
practicality diverges slightly from the theoretical.

On a more intangible level, I seem to remember being taught as an undergrad
that there are still a COUPLE (and I mean just that) algorithms that
can't be done without a goto.  Unfortunately, I can't remember what they
did, though.  If this receives too many flames, maybe I'll have to look
it up.  What the instructor was trying to show by this example, though, was
that there are, indeed, only a COUPLE algorithms which cannot be done
without gotos and that since we weren't doing anything near as complex,
we shouldn't use them (actually couldn't use would be more proper because
if you used one, you flunked the assignment).










-- 
Kevin R. Grazier                                Have you driven a Ford, lately?
Ford Motor Company Scientific Research Labs
Advanced Powertrain Systems & Controls Engineering
uucp: {philabs | pyramid} !fmsrl7!grazier OR  grazier@fmsrl7.UUCP
VOICE: (313) 739-8586