projects
/
rune.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Rune - Further Object abstraction work
[rune.git]
/
tests
/
castf.d
1
#!/usr/local/bin/rune -x
2
#
3
# Code generator - test simple casts.
4
5
import "sys";
6
import <stdio>;
7
8
float f;
9
double d;
10
ldouble g;
11
int8_t s8;
12
int16_t s16;
13
int32_t s32;
14
int64_t s64;
15
uint8_t u8;
16
uint16_t u16;
17
uint32_t u32;
18
uint64_t u64;
19
20
int
21
main(int ac, string_p *av)
22
{
23
f = d;
24
d = f;
25
f = g;
26
d = g;
27
g = f;
28
g = d;
29
30
s8 = f;
31
s16 = f;
32
s32 = f;
33
s64 = f;
34
35
s8 = g;
36
s16 = g;
37
s32 = g;
38
s64 = g;
39
40
f = s8;
41
f = s16;
42
f = s32;
43
f = s64;
44
45
f = u8;
46
f = u16;
47
f = u32;
48
f = u64;
49
50
g = s8;
51
g = s16;
52
g = s32;
53
g = s64;
54
55
g = u8;
56
g = u16;
57
g = u32;
58
g = u64;
59
}