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=0.2 required=5.0 tests=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: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner) Subject: Re: No Go To's Forever! Date: 2000/03/21 Message-ID: <8b8m2e$8201@news.cis.okstate.edu>#1/1 X-Deja-AN: 600566843 References: <38D7B41D.B3494C6A@lmco.com> Organization: Oklahoma State University User-Agent: slrn/0.9.6.2 (Linux) Reply-To: dstarner98@aasaa.ofe.org Newsgroups: comp.lang.ada Date: 2000-03-21T00:00:00+00:00 List-Id: 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