| 1 |
#include <tads.h> |
| 2 |
|
| 3 |
class TestObj: object |
| 4 |
strprop = 'String property with embeddings: p1=<<p1>>, p2=<<p2>>' |
| 5 |
p1 = '<<name>>.p1' |
| 6 |
p2 = '<<name>>.p2' |
| 7 |
; |
| 8 |
|
| 9 |
obj1: TestObj |
| 10 |
name = 'obj1' |
| 11 |
; |
| 12 |
obj2: TestObj |
| 13 |
name = 'obj2' |
| 14 |
; |
| 15 |
|
| 16 |
main(args) |
| 17 |
{ |
| 18 |
local i = 1024; |
| 19 |
local j = 3; |
| 20 |
"This is a dstring with embeddings: i>>j = <<(i >> j)>>\n"; |
| 21 |
|
| 22 |
"Here's one with embeddings and comments: << |
| 23 |
/* a comment in a string */ |
| 24 |
((i >> j) + (i >> j)) |
| 25 |
/* done with the comments */ |
| 26 |
>>. That should do it!\n"; |
| 27 |
|
| 28 |
"\b"; |
| 29 |
|
| 30 |
local s = 'Here\'s an sstring with embeddings: i>>j = <<(i >> j)>>!'; |
| 31 |
i = 123; |
| 32 |
j = 456; |
| 33 |
"\b<<s>>\n"; |
| 34 |
|
| 35 |
s = 'Once again: i=<<i>>, j=<<j>>'; |
| 36 |
i = 999; |
| 37 |
j = 777; |
| 38 |
"<<s>>\n"; |
| 39 |
|
| 40 |
s = 'And at last: i=<<i>>, j=<<j>>'; |
| 41 |
i = j = nil; |
| 42 |
"<<s>>\n"; |
| 43 |
|
| 44 |
"\b"; |
| 45 |
|
| 46 |
"obj1.strprop = <<obj1.strprop>>\n"; |
| 47 |
"obj2.strprop = <<obj2.strprop>>\n"; |
| 48 |
} |