1with Ada.Text_IO; use Ada.Text_IO;
2
3with Ada.Float_Text_IO; use Ada.Float_Text_IO;
4
5with Geometry.Lists; use Geometry.Lists;
6with Geometry.Magic; use Geometry.Magic;
7use Geometry;
8
9procedure Tabulate_Properties(The_List : Cell_Ptr) is
10
11 -- Starts from the beginning of the list and prints the
12 -- properties of the various objects. Note that they come
13 -- out in the reverse order to that in which they were read.
14
15 Local : Cell_Ptr := The_List;
16
17 This_One : Pointer;
18
19begin
20 New_Line;
21 Put(" X Y Area " &
22 "Moment MI MO");
23 New_Line;
24 while Local /= null
25 loop
26 This_One := Local.Element;
27
28 New_Line;
29 Put(Name(This_One.all)); Put(' ');
30
31 Put(This_One.X_Coord, 4, 2, 0); Put(' ');
32 Put(This_One.Y_Coord, 4, 2, 0); Put(' ');
33
34 Put(Area(This_One.all), 6, 2, 0); Put(' ');
35
36 Put(Moment(This_One.all), 6, 2, 0); Put(' ');
37
38 Put(MI(This_One.all), 6, 2, 0); Put(' ');
39
40 Put(MO(This_One.all), 6, 2, 0);
41
42 Local := Local.Next;
43 end loop;
44
45end Tabulate_Properties;