I can generally handle GO TO what I can't handle is "ALTER .... TO PROCEED
TO ...." that is down right deceiving especially when it is buried in an
obscure paragraph.
> -----Original Message-----
> From: John Clogg [SMTP:[log in to unmask]]
> Sent: Thursday, March 11, 2004 8:04 PM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] GO TO
>
> Kent wrote:
> >I was told in 1986 when I worked at Boeing, never to use "GO TO"'s.
>
> Now this is a good posting to liven up the list! Plenty to debate about,
> but since it doesn't involve politics or religion, there will hopefully be
> no name-calling, etc.
>
> OK, now let me weigh in on the "GO TO" question. While I agree that GO
> TOs are generally bad, I have seen some truly awful code written in the
> name of avoiding them. The problem, it seems, is that some people try to
> boil down an entire approach to programming into a simple rule such as
> "Don't use GOTOs". Such a simplistic approach can cause a programmer to
> lose sight of the reasons for the rule, namely to write code that is easy
> to follow and is logically organized. If the programmer writes code that
> is MORE confusing just to avoid a GOTO, then he has failed to achieve the
> purpose of the rule.
>
> In one rather silly example I saw, a program PERFORMed a paragraph that
> contained a STOP RUN. The phrase "a rose by any other name..." comes to
> mind -- this is clearly a GO TO disguised as a PERFORM. That is not to
> say that a GOTO would be a bad thing in this instance; in fact, a GOTO
> would be clearer. Obviously the programmer did not understand the reason
> for avoiding GO TO's. In that same vein, I believe the example Kent gave
> of using GO TO's to exit a paragraph is a perfectly valid use of GOTO.
> After all, there is nothing about a GOTO that is bad from a performance
> standpoint.
>
> Regards,
> John Clogg
>
> -
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|