/[eiffelstudio]/trunk/eweasel/tests/expanded013/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/expanded013/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101338 - (show annotations)
Wed Jan 31 15:19:19 2018 UTC (19 months, 2 weeks ago) by alexk
File size: 1124 byte(s)
Added an example to demonstrate that `set_item` does not work on basic types in classic mode.
1 class TEST
2
3 create
4
5 make
6
7 feature {NONE} -- Creation
8
9 make
10 local
11 b: BOOLEAN
12 c1: CHARACTER_8
13 c4: CHARACTER_32
14 i1: INTEGER_8
15 i2: INTEGER_16
16 i4: INTEGER_32
17 i8: INTEGER_64
18 n1: NATURAL_8
19 n2: NATURAL_16
20 n4: NATURAL_32
21 n8: NATURAL_64
22 p: POINTER
23 r4: REAL_32
24 r8: REAL_64
25 t: TYPED_POINTER [TEST]
26 do
27 b.set_item (True)
28 c1.set_item ('1')
29 c4.set_item ('4')
30 i1.set_item (-1)
31 i2.set_item (-2)
32 i4.set_item (-4)
33 i8.set_item (-8)
34 n1.set_item (11)
35 n2.set_item (22)
36 n4.set_item (44)
37 n8.set_item (88)
38 p.set_item (p + 1)
39 r4.set_item (444)
40 r8.set_item (888)
41 t.set_item (t + 1)
42 print (b); io.put_new_line
43 print (c1); io.put_new_line
44 print (c4); io.put_new_line
45 print (i1); io.put_new_line
46 print (i2); io.put_new_line
47 print (i4); io.put_new_line
48 print (i8); io.put_new_line
49 print (n1); io.put_new_line
50 print (n2); io.put_new_line
51 print (n4); io.put_new_line
52 print (n8); io.put_new_line
53 print (p); io.put_new_line
54 print (r4); io.put_new_line
55 print (r8); io.put_new_line
56 print (t); io.put_new_line
57 end
58
59 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23