IMatrixModelIterator.Move

Syntax

Move(Direction: IteratorDirection);

Parameters

Direction. The parameter that determines moving direction in iterator.

Description

The Move method moves in the specified direction.

Example

Add a link to the MathFin system assembly.

Sub UserProc;
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(09);
        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 UserProc;

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

See also:

IMatrixModelIterator