Tin

Examples · learn/03-functions · 84 of 339

no-result

No result type: the function does something instead of computing a value.

examples/learn/03-functions/no-result.tintin run examples/learn/03-functions/no-result.tin
// No result type: the function does something instead of computing a value.
fn banner(title: string) {
  let line = "=".repeat(title.len + 4)
  print(line)
  print("| {title} |")
  print(line)
}

fn main() {
  banner("Tin")
}