Yurttas/PL/IL/Ada-95/ProgUnits/G/ex 05.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
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_05.adb
19
20
21with Text_IO; use Text_IO;
22
23with EX_05_P; use EX_05_P;
24
25procedure EX_05 is
26
27 A : Integer := 1;
28 B : Integer := 5;
29
30 X : Integer := 2;
31 Y : Integer := 8;
32
33begin
34
35 P("A-B before / ", A, B);
36
37 E(A, B);
38
39 P("A-B after / ", A, B);
40
41 E(A, B);
42
43 New_Line;
44
45 P("X-Y before / ", X, Y);
46
47 E(X, Y);
48
49 P("X-Y after / ", X, Y);
50
51 E(X, Y);
52
53end EX_05;