blob: e69dc7ce0f8cad92091a38b1ccfcf64434212689 (
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
30
31
32
33
34
35
36
37
38
|
byte :: i8;
ubyte :: u8;
short :: i16;
ushort :: u16;
int :: i32;
uint :: u32;
long :: i64;
ulong :: u64;
// short_float :: f16;
float :: f32;
double :: f64;
long_double :: f128;
usize :: u64;
main :: () -> void {
a:u64 = 97;
b := @cast(a,u16);
putc @cast(a,u8);
putc @cast(b,u8);
// print_u64_rev(1234);
};
print_u64_rev :: (value:u64) -> void {
value := value;
first_time := true;
while {
first_time = false;
putc '0' + @cast(value % 10,u8);
value /= 10;
value != 0;
} {}
};
|