/[cvs.andrew.net.au]/uni/COMP2310/lab1/queue_pack_private.adb
ViewVC logotype

Contents of /uni/COMP2310/lab1/queue_pack_private.adb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Jul 27 12:11:40 2005 UTC (17 years, 6 months ago) by apollock
Branch: MAIN
CVS Tags: HEAD
Original lab files

1 package body Queue_Pack_private is
2 procedure Enqueue (Item: in Element; Queue: in out Queue_Type) is
3 begin
4 if Queue.State = Filled and Queue.Top = Queue.Free then
5 raise Queueoverflow;
6 end if;
7 Queue.Elements (Queue.Free) := Item;
8 Queue.Free := Marker'Pred (Queue.Free);
9 Queue.State := Filled;
10 end Enqueue;
11 end Queue_Pack_private;

  ViewVC Help
Powered by ViewVC 1.1.22