Re: "continue/next" for "loop"

From: Georg Bauhaus (sb463ba_at_l1-hrz.uni-duisburg.de)
Date: 11/03/03


Date: Mon, 3 Nov 2003 18:50:38 +0000 (UTC)

Lutz Donnerhacke <lutz@iks-jena.de> wrote:
: * Preben Randhol wrote:
:> Links on this: (Ada, goto and state machine)
:
: It's not a state machine. It's a "parser" which determine the end of the
: current iteration processing at a much deeper level.

Does it have to be at that low language level, then?
Why not carry abstraction further, adjust data definitions,
so that the spaghetti become more manageable? :-)
"Continue that_loop" denotes something, after all.

In addition, "Continue that_loop" might have other natural
connotations for other people, for example Perl programmers
might feel that a bare jump to some loop's start is inferior
to something like this:

  loop
      ...
      if condition then
          goto loop_end;
      end if;
      ...
    <<loop_end>>
      common_cleanup;
  end loop;

Or consult Knuth, on Structured Programming with go to Statements.
http://doi.acm.org/10.1145/356635.356640

Georg



Relevant Pages

  • Re: microcontroller programming -- how to begin
    ... Do they have a main loop and a state machine? ... to stringing a bunch of switches in series/parallel strings. ... seems to be similar to putting together a bunch of relays. ... I would write a big event loop and make a case statement based on my ...
    (sci.electronics.design)
  • Re: Independently controlling four random AI-triggered output
    ... Ron, ... state machine architecture.  A state machine uses a while loop on ... need to constantly start and stop and recreate tasks.  ... You'll notice in this example that there is a while loop that simply ...
    (comp.lang.labview)
  • Re: finite state machine
    ... state machine to code that no longer looks like a finite state machine ... The switch statement will switch on the state and ... Then you have loop just like in the first ... function pointers, and you call the function you get out of the table. ...
    (comp.programming)
  • Re: Finding the execution time
    ... for k in 0 to loop ... Make yourself familiar with the concept of a state machine - especially a synthesizable state machine in VHDL. ... If you want to model real hardware you have to think hardware. ...
    (comp.lang.vhdl)
  • Re: How to implement State Machine
    ... you put two kind of state machine one inside of the other. ... you will be able to controle the elapsed time for one loop. ... For the user interface, use anothe loop with local variable that is read from the state machine. ...
    (comp.lang.labview)