aboutsummaryrefslogtreecommitdiff
path: root/examples/numeral.ct
blob: 38936e99cc84fb6d9e3da0d89fad55871ebea5af (plain) (blame)
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
30
31
32
33
34
35
/* good optimisation target: make these built in */
type numeral {
	u8;
	u16;
	u32;
	u64;
	i8;
	i16;
	i32;
	i64;
	isize;
	usize;
	float;
	double;
}

pub init(mut a *numeral)
{
	*a = 0;
}

pub deinit(mut a *numeral)
{
	*a = 0;
}

pub copy(mut a *numeral, b *numeral)
{
	*a = *b;
}

pub move(mut a *numeral, mut b *numeral)
{
	*a = *b;
}