Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!decwrl!hplabs!hpcea!hpfcdc!hpislx!hplvla!hplvly!boyne From: boyne@hplvly.HP.COM (Art Boyne) Newsgroups: comp.lang.c Subject: Re: Re^2: gotos (actually: **Apology**) Message-ID: <3950003@hplvly.HP.COM> Date: 20 Apr 88 14:40:37 GMT References: <2586@geac.UUCP> Organization: HP Loveland Inst Div, CO Lines: 32 I would like to suggest a down-to-earth reason for having goto's to all of you esoteric computer-science purists: When faced with multiple occurances of a common section of code, one has four choices (any others?): 1) some sort of subroutine, 2) replicating the code in multiple places, 3) some type of big, ugly conditional statement to bring unite the occurances, 4) goto. Subroutine calls are SLOW -->sorry, but we real-world types have performance constraints, and 68000's don't come with 100 MHz options. Replicating code fills ROM -->another constraint not normally considered by those of you using VM systems. My own personal opinion is that the conditional statement may very well be uglier and harder to follow than a goto, especially if there are a number of ways into the code, (eg., error handling). Besides, the conditional statement takes time to execute and fills ROM, a double-whammy. So, what we have left is goto. Before you flame back, I'm not advocating the universal usage of goto, but there are definitely times when it is the right answer to real problems. As for the suggestion made in another response that assembler be used - who ever claimed that assembler is more readable/ supportable than C even given gotos??!! Art Boyne, !hplabs!hplvly!boyne