1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
class TRYME inherit ANY creation make
feature make is local i: INTEGER ashape: SHAPE scribble: ARRAY[SHAPE] arect: RECTANGLE
do !!scribble.make(0, 1) !RECTANGLE!ashape.make_rectangle(10, 20, 5, 6) scribble.put(ashape, 0) !CIRCLE!ashape.make_circle(15, 25, 8) scribble.put(ashape, 1)
from i := scribble.lower until i > scribble.upper loop scribble.item(i).draw scribble.item(i).rmoveto(100, 100) scribble.item(i).draw i := i + 1 end
!!arect.make_rectangle(0, 0, 15, 15) arect.setwidth(30) arect.draw end end
|