Function Deque Class

QueueRemove

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

Signature (Visual Basic / VBA)

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

Code Examples

    Assuming
       Dim dqTemp As New Deque
       dqTemp.QueueAdd 12
       dqTemp.QueueAdd 23
       Dim varTemp As Variant
       Dim bResult As Boolean
    for example
       bResult = dqTemp.QueueRemove(varTemp)
    leaves
       bResult = True
       varTemp = 12
    and
       bResult = dqTemp.QueueRemove(varTemp)
    leaves
       bResult = True
       varTemp = 23
    QueueRemove = RemoveHead(rValue)

Parameters

Parameter Description
rValue Value at the head of the Queue 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 Queue/ Deque is empty).

Notes & Version History

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.