~ubuntu-branches/ubuntu/warty/koffice/warty

« back to all changes in this revision

Viewing changes to lib/kscript/example9.ks

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
struct Struct
2
 
{
3
 
        var a,b,c;
4
 
        func( inout this )
5
 
        {
6
 
                print( this.a, this.b, this.c );
7
 
                this.a = 333;
8
 
        }
9
 
        fun()
10
 
        {
11
 
                print("FUN");
12
 
        }
13
 
};
14
 
 
15
 
class my2
16
 
{
17
 
        func( inout this )
18
 
        {
19
 
                print("Hello");
20
 
        }       
21
 
};
22
 
 
23
 
class my
24
 
{
25
 
        func( inout this )
26
 
        {
27
 
                print("Hello stupid!");
28
 
                this = my2();
29
 
        }
30
 
};
31
 
        
32
 
class super
33
 
{
34
 
        super( in this )
35
 
        {
36
 
                this.a = 555;
37
 
        }
38
 
 
39
 
        over( in this )
40
 
        {
41
 
                print( this.a, "Super");
42
 
        }
43
 
};
44
 
 
45
 
class derived : super
46
 
{
47
 
        derived( in this )
48
 
        {
49
 
                this.super();
50
 
        }
51
 
 
52
 
        over( in this )
53
 
        {
54
 
                print( this.a, "Derived" );
55
 
                super.over( this );
56
 
        }
57
 
 
58
 
        const x = "Torben";
59
 
};
60
 
 
61
 
main
62
 
{
63
 
        m = my();
64
 
        m.func();
65
 
        m.func();
66
 
        print("-------------1");
67
 
        s = Struct();
68
 
        print("-------------2");
69
 
        s.a = 100;
70
 
        print( s.a, "-------------3");
71
 
        s.b = 200;
72
 
        print( s.a, "-------------4");
73
 
        s.c = 300;
74
 
        print( s.func, "-------------5");
75
 
        print( s );
76
 
        print("-------------6");
77
 
        s.func();
78
 
        print( s.a, "-------------7");
79
 
        x = s;
80
 
        x.a = 400;
81
 
        print( s, x );
82
 
        x.a = x.b = x.c = 111;
83
 
        print( x );
84
 
        m.call = x.func;
85
 
        m.call();
86
 
        Struct.fun();
87
 
        d = derived();
88
 
        d.over();
89
 
        print( derived.x );
90
 
}