io.carbon 599 B

123456789101112131415161718
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. package Core library "io";
  7. import library "prelude";
  8. // TODO: Support printing other types.
  9. // TODO: Consider rewriting using native support once library support exists.
  10. fn Print(x: i32) = "print.int";
  11. fn PrintChar(x: i32) -> i32 = "print.char";
  12. fn ReadChar() -> i32 = "read.char";
  13. // TODO: Change this to a global constant once they are fully supported.
  14. fn EOF() -> i32 { return -1; }