aboutsummaryrefslogtreecommitdiff
path: root/code/main.felan
blob: 79a7dd211ab2249b4ac86b2bb398ac03bd421558 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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 := 2;
  println(@typeOf(a) == i64);
};

print_rev :: (value:u64) -> void {
  putc 'a';
  value := value;
  while {
    putc '0' + @cast(value % 10,u8);
    value /= 10;
    value != 0;
  } {}
};

print_rev :: (value:i64) -> void {
  putc 'b';
  value := value;
  while {
    putc '0' + @cast(value % 10,u8);
    value /= 10;
    value != 0;
  } {}
};

print :: (value:bool) -> void {
  if value {
    putc 't';
    putc 'r';
    putc 'u';
    putc 'e';
  } else {
    putc 'f';
    putc 'a';
    putc 'l';
    putc 's';
    putc 'e';
  }
};

println :: (value:bool) -> void {
  print(value);
  putc '\n';
};