Menu

[r244]: / trunk / demos / Source / operator_multiply.adb  Maximize  Restore  History

Download this file

35 lines (29 with data), 982 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- {{Ada/Sourceforge|operator_multiply.adb}}
pragma License (Gpl);
pragma Ada_95;
with Ada.Text_IO;
procedure Operator_Multiply is
package T_IO renames Ada.Text_IO;
package F_IO is new Ada.Text_IO.Float_IO (Float);
package I_IO is new Ada.Text_IO.Integer_IO (Integer);
A : constant Float := 5.0 * 2.0; -- A is now 10.0
B : constant Integer := 5 * 2; -- B is also 10
begin
T_IO.Put ("A = ");
F_IO.Put (Item => A, Fore => 3, Aft => 1, Exp => 0);
T_IO.New_Line;
T_IO.Put ("B = ");
I_IO.Put (Item => B, Width => 3, Base => 10);
T_IO.New_Line;
end Operator_Multiply;
----------------------------------------------------------------------------
-- $Author$
--
-- $Revision$
-- $Date$
--
-- $Id$
-- $HeadURL$
----------------------------------------------------------------------------
-- vim: textwidth=0 nowrap tabstop=8 shiftwidth=3 softtabstop=3 expandtab
-- vim: filetype=ada encoding=utf-8 fileformat=unix foldmethod=indent