Yurttas/PL/IL/Ada-95/F/03/02/01/queue 02.adb

 1--
 2-- Copyright (C) 1998
 3-- All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4--
 5-- Permission to use, copy, modify, and distribute this
 6-- software and its documentation for EDUCATIONAL purposes
 7-- and without fee is hereby granted provided that this
 8-- copyright notice appears in all copies.
 9--
10--
11 
12-- date   : January 1, 1998.
13-- authorĀ : Salih Yurttas.
14
15-- purposeĀ : Queue as a Generic Unique Object.
16
17-- queue_02.adb
18
19
20with Text_IO;
21use Text_IO;
22
23with Queue_02_P;
24
25procedure Queue_02 is
26
27  package Flo_IO is new Float_IO(Float);
28  use Flo_IO;
29
30  package Queue is new Queue_02_P(Queue_Size => 10,
31                                  Element    => Float);
32  use Queue;
33
34  Q_Element : Float := 5.0;
35
36begin
37
38  Enqueue(Q_Element);
39
40  Q_Element := Dequeue;
41
42  Put(Q_Element);
43  New_Line;
44
45end Queue_02;