uses lists;
var
q:PQueue;
count:uInt32;
begin
new(q, init(5, sizeof(uInt32)));
write('Enqueuing numbers...');
for count := 0 to 5 do
if not q^.enqueue(count) then writeln('Queue is full');
writeln('done');
while q^.dequeue(count) do writeln('dequeing: ', count);
dispose(q, done);
end.