IMatrixModelIterator.Move

Syntax

Move(Direction: IteratorDirection);

Parameters

Direction - parameter that determines moving direction within the iterator.

Description

The Move method moves in the direction specified in the Direction parameter.

Example

Sub Main;

Var

M: Matrix[2];

Mm: IMatrixModel;

Iter: IMatrixModelIterator;

I, J: Integer;

Begin

Debug.WriteLine("Source matrix");

For i := 0 To 10 Do

For j := 0 To 10 Do

M[i, j] := Math.RandBetweenI(0, 9);

End For;

End For;

Mm := M As IMatrixModel;

Iter := Mm.CreateModelIterator;

Iter.Move(IteratorDirection.First);

i := 0;

While Iter.Valid Do

i := i + 1;

Debug.Write(Iter.Value + " ");

Iter.Move(IteratorDirection.Next);

End While;

End Sub Main;

After executing the example a matrix containing random values will be created. An iterator will be obtained on the basis of this matrix, and all the matrix values will be displayed.

See also:

IMatrixModelIterator