text t2 100 100 "queue q1 20 150 5 one two three four five cyan magenta" transparent changeParam t2 point 14 text t4 10 20 L transparent text t5 150 20 I transparent text t6 290 20 L transparent text t7 420 20 O transparent groupObject LILO 4 t4 t5 t6 t7 changeParam t4 point 24 changeParam t5 point 24 changeParam t6 point 24 changeParam t7 point 24 text t8 25 20 ast transparent text t9 155 20 n transparent text t10 305 20 ast transparent text t11 440 20 ut transparent groupObject LILO2 4 t8 t9 t10 t11 changeParam t4 point 24 changeParam t5 point 24 changeParam t6 point 24 changeParam t7 point 24 text t0 0 50 "Here is an example of a queue:" black changeParam t0 point 16 delay 1000 begin changeParam t0 color transparent queue q1 180 150 5 one two three four five violet violet end text t1 0 50 "The following command line creates the queue:" black changeParam t1 point 16 delay 1000 begin changeParam t1 color transparent changeParam t2 color blue end text t12 0 50 "There are two command options for queues:" black changeParam t12 point 16 delay 500 begin text eq 315 50 ENQUEUE cyan 16 text and 400 50 and black 16 text dq 430 50 DEQUEUE cyan 16 delay 1000 changeParam t12 color transparent changeParam and color transparent end begin moveRelative eq -250 115 moveRelative dq -90 115 end begin changeParam LILO color magenta delay 1000 changeParam LILO2 color blue text t13 0 50 "The last queue element entered will be the last element to leave." black changeParam t13 point 16 end begin changeParam t13 color transparent changeParam LILO color transparent changeParam LILO2 color transparent end text t14 0 50 "Watch what happens when the queue is dequeued:" black changeParam t14 point 16 delay 1000 begin text t15 100 120 "dequeue ql" transparent changeParam t15 color deeppink changeParam t15 point 14 end delay 1000 dequeue q1 changeParam t15 color blue changeParam t14 text "'one' was the first element removed because it was the first one added" deeppink changeParam t14 color transparent delay 1000 text t17 0 50 "Now watch what happens when the queue is enqueued:" black 16 delay 1000 begin text t18 100 140 "enqueue q2 six" transparent changeParam t18 color deeppink changeParam t18 point 14 changeParam t17 color transparent end delay 500 enqueue q1 six changeParam t18 color blue changeParam t14 text "'six' was added to the back of the queue" deeppink changeParam t14 color black delay 1500 groupObject g1 3 q1 eq dq begin moveRelative g1 0 20 delay 1500 end delay 1000 changeParam t14 color transparent changeParam t17 text "Look at the command line that creates the queue:" delay 2000 changeParam t17 color black changeParam t17 text "Now look at the queue itself:" delay 2000 changeParam t17 text "Note that the entries for the queue are in reversed order:" delay 2000 changeParam t17 text "Remember when specifying elements in the queue command line:" delay 2000 changeParam t17 text "The front of the queue is the left side and the back is the right." delay 1000 text t21 175 350 "END OF DEMO" black 18