TOC PREV NEXT INDEX

loop

Synopsis

module loop {
int+read+write _reset;
int+read+write _run;
int+read _cycle;
int+read _start_val;
int+read _end_val;
int+read _incr;
};

Description

loop iterates an operation. For example, you could use a loop object to control the movement of an object in your application; this could be as simple as controlling the movement of a slider, or as complex as continuously looping a 3D animation.

Input

none.

reset

When set to 1, resets the count subobject to the value of the start_val subobject. This value is reset to 0 right after it is changed.

run

When set to 1, completes an iteration of the loop. It is reset to 0 when the loop is finished.

cycle

If set to 1, iterates the loop continuously.

start_val

Indicates the starting value of the iteration.

end_val

Indicates the ending value of the iteration.

incr

Indicates the interval at which to count from the starting value to the ending value.

Parameters

none.


Output Port

The loop object contains these other subobjects that indicate the progress of the iteration:

done

If set to 1, indicates that an iteration of the loop completed.

count

Indicates the current value between the starting value and ending value.

Example

See the implementation of the Network Editor in v/ne.v for an example of how to use the journal module.


TOC PREV NEXT INDEX