|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > QUE. - Queue > QUE. - Operations > QUE. - Operations |
MiniRobotLanguage (MRL)
QUE.Pop
Get and remove the first value in the queue.
Intention
The QUE.Pop command retrieves and removes the first value in a queue container.
Illustration
Before QUE.Pop operation:
Queue: [1, 2, 3, 4]
After QUE.Pop operation:
Queue: [2, 3, 4]
The first element 1 is removed from the queue.
Syntax
QUE.Pop|P1|P2
Parameter Explanation
P1 - (Variable)
The handle of the queue.
P2 - (Variable)
This variable will store the first value in the queue. If omitted, the value is placed on TOS.
Example
'***********************************
' QUE.Pop - Sample
'***********************************
QUE.New|$$QUE
QUE.Push|$$QUE|42
QUE.Pop|$$QUE|$$VAL
DBP.Value popped from queue: $$VAL
ENR.
Remarks
-
Limitations:
-
See also:
•