diff options
Diffstat (limited to 'tree/src/main.adb')
-rw-r--r-- | tree/src/main.adb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tree/src/main.adb b/tree/src/main.adb new file mode 100644 index 0000000..b9ece1a --- /dev/null +++ b/tree/src/main.adb | |||
@@ -0,0 +1,14 @@ | |||
1 | with Ada.Text_IO; use Ada.Text_IO; | ||
2 | |||
3 | with Tree; | ||
4 | |||
5 | procedure Main is | ||
6 | package IntTree is new Tree (Integer); | ||
7 | T : IntTree.Tree_Access := new IntTree.Tree; | ||
8 | begin | ||
9 | T.Left := new IntTree.Tree; | ||
10 | T.Right := new IntTree.Tree; | ||
11 | T.Right.Left := new IntTree.Tree; | ||
12 | |||
13 | Put_Line ("Tree height:" & IntTree.Height (T)'Image); | ||
14 | end Main; | ||