Yurttas/PL/IL/Ada-95/F/03/02/00/complex 01.adb

From ZCubes Wiki
Revision as of 05:15, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="ada" line start="1" enclose="div">-- -- Copyright(C) 1998 -- All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. -- -- Permis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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-- purpose : Complex abstract data type object usage.
15
16-- complex_01.adb
17
18
19with Ada.Text_IO;
20use Ada.Text_IO;
21
22with Complex_01_P;
23use Complex_01_P;
24
25procedure Complex_01 is
26
27  A,
28  B  : Float;
29
30  C,
31  D,
32  E  : Complex;
33
34begin
35
36  Put_Complex(C);
37
38  Put_Complex(D);
39
40  Put_Complex(E);
41
42  New_Line;
43
44  A := 2.0;
45  B := 4.0;
46  C := Assemble(A,B);
47
48  Put_Complex(C);
49
50  New_Line;
51
52  D := Assemble(B,A);
53
54  Put_Complex(D);
55
56  New_Line;
57
58  E := C+D;
59
60  Put_Complex(E);
61
62end Complex_01;