Yurttas/PL/IL/Ada-95/F/06/vacation/vacation p.adb
Jump to navigation
Jump to search
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-- date : January 1, 1998.
12-- author : Salih Yurttas.
13
14-- vacation_p.adb
15
16
17package body Vacation_P is
18
19 use Ada.Numerics.Float_Random;
20
21 procedure Run(Q : in Integer) is
22 Index : Integer := Q;
23 G : Generator;
24 begin
25 for I in Trips
26 loop
27 Reset(G);
28 Put(I);
29 Put(" ");
30 Put_Line(Vacation_Places(Index));
31 delay Duration(Random(G))*2;
32 end loop;
33 Put("Done! ");
34 Put_Line(Vacation_Places(Index));
35 end Run;
36
37end Vacation_P;