Skip to content
justinmann edited this page Dec 24, 2017 · 6 revisions

Here are all intrinsic types

  • i32 - 32-bit signed integer
  • i64 - 64-bit signed integer
  • u32 - 32-bit unsigned integer
  • u64 - 64-bit unsigned integer
  • ptr - 32-bit or 64-bit depending on computer
  • f32 - 32-bit float
  • f64 - 32-bit float
  • char - 8-bit unsigned integer
  • bool - 1-bit integer
  • string - null terminated string
  • array!t - an array of fixed size where every element is the same type
  • list!t - same as array, but can grow
  • hash![k, v] - a hash map where every key & value is the same type
  • struct - when a function returns this, it is returning a struct
0 // i32
0u // u32
0l // i64
0ul // u64
0.0f // f32
0.0 // f64
'0' // char
true // bool
"hi" // string
[1, 2, 3] // array!i32
{ "a" : "apple", "b" : "boy" } // hash![string, string]
list!i32([1, 2, 3]).add(5) // list!i32

Clone this wiki locally