close
Warning:
Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.
Ticket #863: ticket_17.ObjectDecompilation.tol
File ticket_17.ObjectDecompilation.tol, 495 bytes (added by pgea@…, 15 years ago) |
|
Line | |
---|
1 | |
---|
2 | Class @Element; |
---|
3 | |
---|
4 | Class @Container { |
---|
5 | Set _.elements = Copy(Empty); |
---|
6 | Real AddElement(Real valor) { |
---|
7 | @Element element = [[ |
---|
8 | @Container _.parent = _this; |
---|
9 | Real _.valor = valor |
---|
10 | ]]; |
---|
11 | Set Append(_.elements, [[element]]); |
---|
12 | 1 |
---|
13 | }; |
---|
14 | Real Clear(Real void) { |
---|
15 | Set _.elements := Copy(Empty); |
---|
16 | 1 |
---|
17 | } |
---|
18 | }; |
---|
19 | |
---|
20 | Class @Element { |
---|
21 | @Container _.parent; |
---|
22 | Real _.valor |
---|
23 | }; |
---|
24 | |
---|
25 | @Container container; |
---|
26 | |
---|
27 | Real container::AddElement(5); |
---|
28 | |
---|
29 | //Real container::Clear(?); |
---|
Download in other formats: