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,affd14e05b8fb09a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-28 20:58:09 PST Path: archiver1.google.com!news2.google.com!news1.google.com!news.glorb.com!wn51feed!worldnet.att.net!attbi_s53.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: Hierarchical States Machines X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: NNTP-Posting-Host: 24.21.42.251 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s53 1083211088 24.21.42.251 (Thu, 29 Apr 2004 03:58:08 GMT) NNTP-Posting-Date: Thu, 29 Apr 2004 03:58:08 GMT Organization: Comcast Online Date: Thu, 29 Apr 2004 03:58:08 GMT Xref: archiver1.google.com comp.lang.ada:7553 Date: 2004-04-29T03:58:08+00:00 List-Id: I don't have anything against using goto's for state machines... but... I usually set up an enumeration for each state: type my_states is ( start_state, initializing, etc, end_state ); And then use a loop with an enclosed case statement: state := start_state; loop case state is when start_state => ... state := initializing; when initializing => when etc => when end_state => end case; end loop; In my opinion it makes things easier to follow since the entry to a new state always happens from the same place. Steve (The Duck) "Fabien" wrote in message news:fed2d60.0404281048.41d6c549@posting.google.com... > Hi everyone !!! > > Pretty new to ADA dev., i am currently trying to implement a > hierarchical state machine for my application. So far, i must confess > that i do not really get on well with it. I am thus looking for some > people who might have tried to do it and who could give me some useful > tips . > > Fabien > > pS : I don't look for a ready-to-use solution, just some help !!!!!