Yurttas/PL/IL/Ada-95/ProgUnits/G/ex 08 p.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-- ex_08_p.adb
16
17
18with Text_IO; use Text_IO;
19
20package body EX_08_P is 
21
22  package Int_IO is new Integer_IO(Integer); use Int_IO;
23
24  procedure P(H  : in String;
25              A,
26              B  : in Integer) is 
27  begin
28    New_Line;
29    Put_Line(H);
30    Put(A,1);
31    New_Line;
32    Put(B,1);
33    New_Line;
34  end P;
35
36  package Flo_IO is new Float_IO(Float); use Flo_IO;
37
38  procedure P(H  : in String;
39              A,
40              B  : in Float) is 
41  begin
42    New_Line;
43    Put_Line(H);
44    Put(A);
45    New_Line;
46    Put(B);
47    New_Line;
48  end P;
49
50  procedure E(A,
51              B  : in out Element) is
52    T : Element;
53  begin
54    T := A;
55    A := B;
56    B := T;
57  end E;
58
59end EX_08_P;