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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cf677878aa77e0d8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-15 14:21:10 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Matthias Kretschmer Newsgroups: comp.lang.ada Subject: Re: an infinate loop Date: Sun, 15 Jul 2001 23:18:28 +0200 Organization: T-Online Message-ID: <3B5208A4.90007@gmx.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 995231901 03 30246 p2LiSmYXSHAMa1 010715 21:18:21 X-Complaints-To: abuse@t-online.com X-Sender: 520099920815-0001@t-dialin.net User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.2) Gecko/20010707 X-Accept-Language: en-us Xref: archiver1.google.com comp.lang.ada:9975 Date: 2001-07-15T23:18:28+02:00 List-Id: > job. The other way to do state machines is to use "goto" for the state > transitions, but this looks like a school assignment, and I doubt your > instructor wants to see that (although some might like it). I do not think "goto" is the right way to do this nowadays. Even if your language supports goto statement (but in the case of Ada it was implemented to have programs/algorithms from other languages like FORTRAN easily ported). Using case statements and loops should be the "better" way to do this. It should be easier to understand the program. m.k.