blob: ac2387eb17b37f503a93892208ce93e35647ec92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using GLib;
class Maman.Foo : Object {
public void run () {
foreach (string s in create_list ()) {
stdout.printf (" %s", s);
}
}
public List<string> create_list () {
var s = new List<string>();
s.append ("2");
s.append ("3");
return s;
}
static int main (string[] args) {
stdout.printf ("List construction: 1");
var foo = new Foo ();
foo.run ();
stdout.printf (" 4\n");
return 0;
}
}
|