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

Remove Function
Stack Class

Public Function Remove( _
    ByVal vElement As Long _
    ) As Boolean

Remove the value on the top of the stack (if vElement is 0),
or remove the Nth element from the bottom of the stack (if vElement is >0).
Return True upon success and False upon failure.

Example:
    Assuming
       stkTemp.StringView() = "(Top) 4, 3, 2, 1 (Bottom)"
    for example
       stkTemp.Remove(0) = True
    leaves
       stkTemp.StringView() = "(Top) 3, 2, 1 (Bottom)"
See also:
    Drop Function
    RemoveAll Subroutine
    Pop Function
vElement: Number of the stack element to be removed, counting from the bottom of the stack starting at one. If vElement is 0 (zero), then this function removes the element on the top of the stack.
Return value: Function returns True upon success. The function does nothing and returns False if the stack is empty.
Note: Remove(0) is the same as Drop(1)
v1.3 BugFix: This Function has been fixed to support the removal of elements from Stacks containing Object and/or DataObject type Values.

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