|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > ARS. - Array's > !ARS. - Queue Operations > ARS. - Queue Operations |
MiniRobotLanguage (MRL)
ARS.QuePop
Pop the first value from the queue.
Intention
The ARS.QuePop command removes the first value from the specified queue and returns it.
This command is useful for processing queues in a first-in, first-out (FIFO) manner.
Illustration
[ Value1 Value2 Value3 ] → [ Value2 Value3 ]
Syntax
ARS.QuePop|$$ARR[|$$VAL]
Parameter Explanation
$$ARR - (Variable)
The handle of the queue from which the value will be popped.
$$VAL - (Optional, Variable)
The variable to store the popped value. If omitted, the value is placed on the Top of Stack (TOS).
Example
'***********************************
' ARS.QuePop - Sample
'***********************************
QUE.New|$$QUE
ARS.QuePush|$$QUE|Value1
ARS.QuePush|$$QUE|Value2
ARS.QuePop|$$QUE|$$VAL
DBP.New popped value: $$VAL
'
QUE.New|$$QUE
ARS.QuePush|$$QUE|10
ARS.QuePush|$$QUE|20
ARS.QuePop|$$QUE|$$VAL
DBP.New popped value: $$VAL
ENR.
Remarks
-
Limitations:
-
See also:
•