Function Stack Class

Rotate

Rotate down the top THREE items on the stack. Item previously at position Top - 2 ends up on the top of the stack. Function returns True upon success and False upon failure.

Signature (Visual Basic / VBA)

Public Function Rotate( _
    ) As Boolean

Code Example

    Assuming
       stkTemp.StringView() = "(Top) 4, 3, 2, 1 (Bottom)"
    for example
       stkTemp.Rotate() = True
    leaves
       stkTemp.StringView() = "(Top) 2, 4, 3, 1 (Bottom)"

Return Value

Function returns True upon success. The function does nothing and returns False if there are fewer than three items on the stack.

Notes & Version History

Note Same as but faster than RollDown (3)
v1.3 BugFix This Function has been fixed to support the Rotation of elements from Stacks containing Object and/or DataObject type Values.