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, MSGID_RANDY 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: Robert Dewar Subject: Re: No Go To's Forever! Date: 2000/03/22 Message-ID: <8b9fk3$l18$1@nnrp1.deja.com>#1/1 X-Deja-AN: 600690322 References: <38D7B41D.B3494C6A@lmco.com> <8b8m2e$8201@news.cis.okstate.edu> X-Http-Proxy: 1.0 x36.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Mar 22 03:45:11 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-03-22T00:00:00+00:00 List-Id: In article <8b8m2e$8201@news.cis.okstate.edu>, dstarner98@aasaa.ofe.org wrote: > The GNAT sources contain 300-400 goto statements and > a brief glance at parts shows that the goto statements > are highly readable. It's actually quite instructive to look through these goto statements. About 60% are in the finite state machine that is part of the SPITBOL pattern matching unit. I have always felt that gotos are a very natural representation of the arcs of a finite state machine, and I invite people to look at the code of g-spipat.adb to see if you agree :-) Another section are for the finite state machine in the scanner. Another big bunch are continue gotos. Ada lacks a continue statement, and thus this facility must be simulated with a goto as in loop if ... then goto Continue; <> null; end loop; This is actually quite a structured use of goto There are only about 8 other instances of gotos in the several hundred thousand lines of sources. Sent via Deja.com http://www.deja.com/ Before you buy.