reid-llvm/examples/cast.reid

19 lines
293 B
Plaintext

// Arithmetic, function calls and imports!
import std::allocate;
import std::print;
fn other() -> i16 {
return 6;
}
fn main() -> u32 {
let value = other() as u32;
let other_value = other() as f32;
let same_value = other() as i16;
let v = (allocate(4) as *u32);
return v[0];
}