[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
rotate(a)                    rotate array

    The value of the first element goes to the last element, the second  to
    the first, third to  the second, etc.   If the array has  the following
    elements:

    a[1] = 1
    a[2] = 2
    a[3] = 3
    a[4] = 4

    then rotate(a) will have the result:

    a[1] = 2
    a[2] = 3
    a[3] = 4
    a[4] = 1

    It is not necessary to specify one-dimensional arrays.  If:

    a[1][1] = 1
    a[1][2] = 2
    a[1][3] = 3
    a[1][4] = 4

    Then rotate(a[1]) will produce the result:

    a[1][1] = 2
    a[1][2] = 3
    a[1][3] = 4
    a[1][4] = 1

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson