reid-llvm/examples/ptr.reid

12 lines
155 B
Plaintext

// Arithmetic, function calls and imports!
import std::allocate;
fn main() -> u8 {
let mut ptr = allocate(4);
ptr[0] = 5;
return ptr[0];
}