All pastes #189897 Raw Edit

Ernz

public text v1 · immutable
·published 2006-10-03 14:43 UTC
rendered paste body
procedure ShowQueue(AQueue : TQueue);
var i : Integer;
begin
    WriteLN(AQueue.Size,' items in queue');
    for i := 1 to MaxSize do
      begin
        WriteLN;
        WriteLN('Item ',i,' of Queue Array:');
        if i = AQueue.Tail then
          WriteLN('                               *** TAIL ***');
        if i = AQueue.Head then
          WriteLN('                               *** HEAD ***');
        WriteLN(AQueue.Items[i].Name);
        WriteLN(AQueue.Items[i].Age);
      end;
end;