Queue

Queue is a another type of collective data that stores data in a "first in, first out" manner. To create an empty queue, call the queue function

   q = queue();

To add an item into the queue,

   q.enqueue(x);

To remove the next available item in the queue

   x = q.dequeue();

To check the length of the queue

   s.length;



oz 2009-12-22