From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.7 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, INVALID_MSGID,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,14f7200925acb579 X-Google-Attributes: gid103376,public From: Bill Dale Subject: Re: No Go To's Forever! Date: 2000/03/21 Message-ID: <38D81DF6.D4AA73FC@lmco.com>#1/1 X-Deja-AN: 600657087 Content-Transfer-Encoding: 7bit References: <38D7B41D.B3494C6A@lmco.com> <8b8m2e$8201@news.cis.okstate.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin - Missiles & Space Mime-Version: 1.0 Reply-To: william.dale.jr@lmco.com Newsgroups: comp.lang.ada Date: 2000-03-21T00:00:00+00:00 List-Id: David Starner wrote: > > On Tue, 21 Mar 2000 09:40:45 -0800, Bill Dale wrote: > >dis90072 wrote: > >> > >> Having learned ada for the past six months, I have found no reference to > >> the 'jump' command. In MSDOS you can use the 'goto' command. Even in > >> damn assembler you can jump. What is the equivalent in ada? I have had > >> enough of endless 'IF' statements and everlasting case statements. I > >> know it might make the program hard to follow, but I don't care! I must > >> have it! > >> Please......! > >> Regards, > >> Matt. > > > >Never use a GOTO - ever. At all. Anywhere. Period. > > This seems absurd. I occasionally come upon situations > where it's either a goto statment or a boolean variable, > and the boolean variable is no more readable. > The GNAT sources contain 300-400 goto statements and > a brief glance at parts shows that the goto statements > are highly readable. > > (I do realize the evil that a goto statement can be - > I spent much of my youth typing in Basic programs from > books. This does not prove that a judicious use of goto > statements in a language with appropriate control structures > like C or Ada is wrong.) > > -- > David Starner - dstarner98@aasaa.ofe.org > Only a nerd would worry about wrong parentheses with > square brackets. But that's what mathematicians are. > -- Dr. Burchard, math professor at OSU OK, I'll jump back in on this. I just left an assignment (incomplete BTW) updating a Fortan program. Some of the source was 50% GOTOs - no kidding. Line numbers, too. IF (FRED.EQ.0) GO TO 124 IF (BARNY.EQ.1) GO TO 234 IF (WILMA.EQ.2) GO TO 180 Line after obscure line. Awful crap. Life is too short to deal with this stuff. I can confidently say I have never used a GOTO in Ada. Never had to. -- No-GOTO Bill