diff options
author | 3gg <3gg@shellblade.net> | 2025-08-09 16:03:28 +0200 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2025-08-09 16:03:28 +0200 |
commit | 727e3c59346da4f91284b34b4c18f2e0ba155e53 (patch) | |
tree | 807dccd5cba3c6bae2f8d0c9910157e306c6da5b /tree/src/main.adb |
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; | ||