| 1 |
#include <tads.h> |
| 2 |
|
| 3 |
Book template 'bookName'; |
| 4 |
Watch template 'watchName'; |
| 5 |
Item template 'itemName'; |
| 6 |
object template 'name'; |
| 7 |
|
| 8 |
Book 'book 1'; |
| 9 |
book2: Book 'book2'; |
| 10 |
Watch 'watch 1'; |
| 11 |
watch2: Watch 'watch 2'; |
| 12 |
Stopwatch 'stopwatch 1'; |
| 13 |
stopwatch2: Stopwatch 'stopwatch 2'; |
| 14 |
Item 'item 1'; |
| 15 |
item2: Item 'item 2'; |
| 16 |
Thing 'thing 1'; |
| 17 |
thing2: Thing 'thing 2'; |
| 18 |
Box 'box 1'; |
| 19 |
box2: Box 'box 2'; |
| 20 |
|
| 21 |
modify Thing |
| 22 |
sdesc = "name = <<name>>\n" |
| 23 |
; |
| 24 |
|
| 25 |
modify Watch |
| 26 |
sdesc = "modified watch sdesc: <<inherited.sdesc>>" |
| 27 |
; |
| 28 |
|
| 29 |
#if 0 |
| 30 |
extern class Foo; |
| 31 |
Foo 'foo 1'; |
| 32 |
foo2: Foo 'foo 2'; |
| 33 |
#endif |
| 34 |
|
| 35 |
main(args) |
| 36 |
{ |
| 37 |
for (local obj = firstObj(Thing) ; obj != nil ; obj = nextObj(obj, Thing)) |
| 38 |
obj.sdesc; |
| 39 |
for (local obj = firstObj(Item) ; obj != nil ; obj = nextObj(obj, Item)) |
| 40 |
obj.sdesc; |
| 41 |
} |
| 42 |
|