<-- Previous || Up || Next -->

Swap Function
Stack Class

Public Function Swap( _
    ) As Boolean

Swap the two values on the top of a stack.
Function returns True upon success and False upon failure.

Example:
    Assuming
       stkTemp.StringView() = "(Top) 4, 3, 2, 1 (Bottom)"
    for example
       stkTemp.Swap() = True
    leaves
       stkTemp.StringView() = "(Top) 3, 4, 2, 1 (Bottom)"
See also:
    RollDown Function
    RollUp Function
Return value: Function returns True upon success. The function does nothing and returns False if there are fewer than two items on the stack.
Note: Same as but faster than either RollDown(2) or RollUp(2)
v1.3 BugFix: This Function has been fixed to support the Swapping of elements from Stacks containing Object and/or DataObject type Values.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.