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

Stack Pop Function
Deque Class

Public Function StackPop( _
    ByRef rValue As Variant _
    ) As Boolean

Remove an item from the stack when the deque is being used as a stack.
Same as RemoveHead.

Example:
    Assuming
       Dim dqTemp As New Deque
       dqTemp.StackPush 12
       dqTemp.StackPush 23
       Dim varTemp As Variant
       Dim bResult As Variant
    for example
       bResult = dqTemp.StackPop(varTemp)
    leaves
       bResult = True
       varTemp = 23
    and
       bResult = dqTemp.StackPop(varTemp)
    leaves
       bResult = True
       varTemp = 12
See also:
    StackPush Subroutine
    RemoveHead Function
    Stack Class
       Pop Function
rValue: Value at the top of the Stack is assigned into variable rValue. rValue must be compatible with the value that is being retrieved.
Return Value: Function returns True upon success and False upon failure (when the Stack/Deque is empty).
Definition:
    StackPop = RemoveHead(rValue)
v1.3 BugFix: This function has been changed to return the retrieved value via an argument instead of via its return value. This is so that you do not have to know in advance whether the function will return an object reference or an ordinary value. Also, this Function has been fixed to support the retrieval of Object and DataObject type Values.

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