Yurttas/PL/IL/Ada-95/ProgUnits/A/treeop 00.adb
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
12-- date : January 1, 1998.
13-- author : Salih Yurttas.
14
15-- purpose : creation of tree as nodes of information and
16-- searching in (pre,in,post)order for output.
17
18-- treeop_00_p.adb
19
20
21with Text_IO; use Text_IO;
22
23with TreeOp_00_P; use TreeOp_00_P;
24
25procedure TreeOp_00 is
26
27 Root : Ptr_Node;
28
29begin
30
31 Enter(Root);
32
33 New_Line(3);
34 Put_Line("Nodes listed in preorder /");
35 New_Line;
36 Pre_Order(Root);
37
38 New_Line(3);
39 Put_Line("Nodes listed in inorder /");
40 New_Line;
41 In_Order(Root);
42
43 New_Line(3);
44 Put_Line("Nodes listed in postorder /");
45 New_Line;
46 Post_Order(Root);
47
48 New_Line;
49
50end TreeOp_00;