summaryrefslogtreecommitdiff
path: root/tree/src/main.adb
diff options
context:
space:
mode:
Diffstat (limited to 'tree/src/main.adb')
-rw-r--r--tree/src/main.adb14
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 @@
1with Ada.Text_IO; use Ada.Text_IO;
2
3with Tree;
4
5procedure Main is
6 package IntTree is new Tree (Integer);
7 T : IntTree.Tree_Access := new IntTree.Tree;
8begin
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);
14end Main;