~ubuntu-branches/ubuntu/wily/gargoyle-free/wily-proposed

« back to all changes in this revision

Viewing changes to tads/tads3/test/data/static.t

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Beucler
  • Date: 2009-09-11 20:09:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090911200943-idgzoyupq6650zpn
Tags: upstream-2009-08-25
ImportĀ upstreamĀ versionĀ 2009-08-25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "tads.h"
 
2
 
 
3
class Connector: object
 
4
    construct(name)
 
5
    {
 
6
        tadsSay('Connector.construct(' + name + ')\n');
 
7
        name_ = name;
 
8
    }
 
9
    name_ = nil
 
10
;
 
11
 
 
12
obj1: object
 
13
    prop1 = 5
 
14
    prop2 = static(new Connector('hello'))
 
15
    prop3 = static(self.prop4 + 10)
 
16
    prop4 = static(getTime(GetTimeTicks))
 
17
    prop5 { return new Connector('goodbye'); }
 
18
;
 
19
 
 
20
main(args)
 
21
{
 
22
    "start: ticks = <<getTime(GetTimeTicks)>>\b";
 
23
    
 
24
    "obj1.prop1 = <<obj1.prop1>>\n
 
25
    obj1.prop2.name_ = <<obj1.prop2.name_>>\n
 
26
    obj1.prop3 = <<obj1.prop3>>\n
 
27
    obj1.prop4 = <<obj1.prop4>>\n
 
28
    obj1.prop5.name_ = <<obj1.prop5.name_>>\n";
 
29
 
 
30
    "\bend: ticks = <<getTime(GetTimeTicks)>>\n";
 
31
}