/[eiffelstudio]/trunk/eweasel/tests/exec040/m_arrayed_list.e
ViewVC logotype

Contents of /trunk/eweasel/tests/exec040/m_arrayed_list.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years ago) by manus
File size: 836 byte(s)
Moved from trunk/Src/eweasel to trunk/eweasel so that a simple checkout of the source code is not penalized by the lenghty process of checking out all the tests of eweasel.
1
2 --| Copyright (c) 1993-2006 University of Southern California and contributors.
3 --| All rights reserved.
4 --| Your use of this work is governed under the terms of the GNU General
5 --| Public License version 2.
6
7 class M_ARRAYED_LIST [G]
8 inherit
9 ARRAYED_LIST [G]
10 creation
11 make
12 feature
13
14 process is
15 do
16 !!list.make (count);
17 process_range (lower, upper);
18 end;
19
20 list: ARRAYED_LIST [G];
21
22 process_range (low, high: INTEGER) is
23 local
24 mid: INTEGER;
25 do
26 if high > low then
27 mid := (low + high) // 2;
28 process_range (low, mid);
29 process_range (mid + 1, high);
30 build_list (high - low + 1);
31 end
32 end;
33
34 build_list (item_count: INTEGER) is
35 local
36 k: INTEGER;
37 def: G;
38 do
39 from
40 list.wipe_out;
41 k := 1
42 until
43 k > item_count
44 loop
45 list.extend (def);
46 k := k + 1;
47 end
48 end;
49
50 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23