// This is from Hare tutorials: // https://harelang.org/tutorials/introduction/ use bufio; use fmt; use os; use strings; export fn main() void = { let x: str = "\0 \x234 \uaaaaa \Ufffffffff"; let z: char = 'a'; let y: char = '\0'; let n = 7e7i8; let f = 8.6; let f2 = 8.6f64; let bin = 0x1231234f32; let asd = \01234553; let b = true; const user = askname(); greet(user); }; // Asks the user to provide their name. fn askname() str = { fmt::println("Hello! Please enter your name:")!; const name = bufio::scanline(os::stdin)! as []u8; return strings::fromutf8(name)!; }; // Greets a user by name. fn greet(user: str) void = { fmt::printfln("Hello, {}!", user)!; };