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.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: =?ISO-8859-1?Q?Tim_Gahnstr=F6m?= Subject: Re: No Go To's Forever! Date: 2000/03/22 Message-ID: #1/1 X-Deja-AN: 600609396 References: <38D7B41D.B3494C6A@lmco.com> <38D7B83B.27DC06C8@earthlink.net> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: abuse@chalmers.se X-Trace: nyheter.chalmers.se 953679612 14394 129.16.234.157 (21 Mar 2000 23:00:12 GMT) Organization: Chalmers University of Technology Mime-Version: 1.0 NNTP-Posting-Date: 21 Mar 2000 23:00:12 GMT Newsgroups: comp.lang.ada Date: 2000-03-21T23:00:12+00:00 List-Id: On Tue, 21 Mar 2000, Charles Hixson wrote: > Bill Dale wrote: > > Never use a GOTO - ever. At all. Anywhere. Period. > > OK, I'll put you down as not interested in working for me. > > Now, now. I'm sure that I've use a goto instruction at least 6 times in the > last decade. Well, maybe 5 times. I notice that alot of people really hate gotos... But why is it sooo bad can someone tell me that??? eg. this little snipet to eat spaces andnewlines in a textfiles to get to the first character look_ahead(in_file,ch,bool); <> while bool loop skipline(infile); look_ahead(in_file,ch,bool); end loop; if ch=' ' then while ch=' ' loop get(infile,ch); look_ahead(in_file,ch,bool); end loop; goto start; end if; Start_reading the words I assume this is a typical example of bad goto use but I canot figure out why, I think it is nice and easy to read and it takes care of potential ' ',' ','\n','\n',' ',' ','\n' I realize everything is posible to do without gotos but I canot figure out why it is so horible. Please enlighten me. Is goto statments particular slow? Tim