Rune - Further Object abstraction work
[rune.git] / tests / ptr1.d
1 #!/usr/local/bin/rune -x
2 #
3 # Demonstrate constant types.   Constants in Rune are effectively what
4 # '#define BLAH 23' would be in C, except they are specifically typed.
5
6 import "sys";
7 import <stdio>;
8
9 alias stdio.File @stdout = stdio.stdout;
10
11 public
12 int
13 main(int ac, string_p *av)
14 {
15     double ds[4];
16     double *dp = &ds[0];
17
18     ds[0] = 0.0;
19     ds[1] = 1.0;
20     ds[2] = 2.0;
21     ds[3] = 3.0;
22     ac = 1;
23     ac = 2;
24     ac = 3;
25     ac = 4;
26
27     return 0;
28 }