
Cantata(Control)             Khoros              Cantata(Control)

     COUNT-LOOP Control Structure

     The COUNT-LOOP structure is used to create a simple counting
     loop.  The following parameters determine its operation.

     Loop Control Variable
          Counting (index) variable used to control the looping
          process.

     Initial Value
          Initial (starting) value to be assigned to the loop
          control variable.

     Increment Value
          Increment (step) value to be added to the loop control
          variable each time through the loop.

     Final Value
          Final (test) value to be used to determine when looping
          should terminate.

     Values may be constants, defined variables, or expressions.
     (See documentation on `VARIABLES subform' for description of
     valid expressions.)

     EXECUTION

     The first time the glyph is executed (or after a RESET), the
     `Loop Control Variable' is initialized to the `Initial
     Value' then tested against the `Final Value'.  If the `Loop
     Control Variable' is LESS than or EQUAL to the `Final
     Value', then the appropriate input data is passed to the
     `Loop Output' and the loop is executed.

     To avoid synchronization problems, ALL children of a loop
     glyph (those glyphs connected to the COUNT-LOOP output) are
     executed BEFORE the loop glyph is re-executed.  When the
     execution path returns to the COUNT-LOOP glyph, the `Incre-
     ment Value' is added to the `Loop Control Variable', and it
     is compared to the `Final Value', etc.  If the `Loop Control
     Variable' is GREATER than the `Final Value', then the
     appropriate input data is passed to the `Exit Output' and
     execution passes out of the loop.

     COUNT_LOOP USAGE

     Input   The "upper" input arrow corresponds to the `Initial
             Input' to the loop.  Data on this connection will be
             passed to `Loop Output' when the loop is first exe-
             cuted (or after a `RESET').  The `Initial Input' is
             optional, and thus not required in loops for which
             it is not needed.

             The "lower" input arrow corresponds to the `Loop
             Input'.  The glyph which produces the value to be
             passed back through the loop is connected here to
             indicate the feedback to the loop.  If no feedback
             is needed, or the initial input is to be used on
             each pass through the loop, the `Loop Output' should
             be connected back to the COUNT-LOOP here (see Loop
             Examples).

     Output  The "upper" output arrow corresponds to the final
             loop `Exit Output'. If further processing is
             required AFTER the loop, those glyphs are connected
             here.  (The `Exit Output' is optional.)

             The "lower" output arrow corresponds to the `Loop
             Output' path. The first glyph in the loop sequence
             is connected here.

             Copyright 1992, University of New Mexico. All rights
             reserved.

Khoros                    Release: 1.0                          1

