You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
397 B
Plaintext

program queuetest;
uses
queue in '../lib/queue.pas';
var
qu, qe : queue_obj;
begin
qu := init_queue;
qe := init_queue;
enqueue(qu, 'Hello');
enqueue(qu, 'World');
enqueue(qu, 'How');
enqueue(qe, 'Another queue');
enqueue(qu, 'Are');
enqueue(qu, 'You');
enqueue(qu, '?');
while is_empty(qu) = false do
begin
WriteLn(dequeue(qu));
end;
WriteLn(dequeue(qe));
end.