Yurttas/PL/IL/Ada-95/ProgUnits/G/ex 07.adb

From ZCubes Wiki
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 
12-- date   : January 1, 1998.
13-- author : Salih Yurttas.
14
15-- purpose : to demonstrate a procedure structure with packages
16--           in Ada-95 programming structuring and composition.
17
18-- ex_07.adb
19
20
21with Text_IO; use Text_IO;
22
23with EX_05_P; use EX_05_P;
24with EX_06_P; use EX_06_P;
25
26procedure EX_07 is 
27
28  A : Integer := 1;
29  B : Integer := 5;
30
31  X : Float := 2.4;
32  Y : Float := 8.1;
33
34begin
35
36  P("A-B before / ", A, B);
37
38  E(A, B);
39
40  P("A-B after / ", A, B);
41
42  E(A, B);
43
44  New_Line;
45
46  P("X-Y before / ", X, Y);
47
48  E(X, Y);
49
50  P("X-Y after / ", X, Y);
51
52  E(X, Y);
53
54end EX_07;