Stdio - SardonyxLang/SardonyxStd GitHub Wiki

require "stdio"

This library handles basic input/output functions, including console and file I/O.

Object Stdio

  • Stdio:write(s): Same as Stdio:Stdout:write.
  • Stdio:writeln(s): Same as Stdio:Stdout:writeln.
  • Stdio:readln(): Same as Stdio:Stdin:readln.

Object Stdio:Stdout

  • Stdio:Stdout:write(s): writes s, with no newline, to standard output.
  • Stdio:Stdout:writeln(s): writes s followed by a newline to standard output.

Object Stdio:Stdin

  • Stdio:Stdin:readln(): reads and returns one line from standard input.

Object Stdio:File(name)

  • File.write(s): writes s to name.
  • File.writeln(s): writes s followed by a newline to name.
  • File.readln(): reads one line from name.
  • File.read(): reads all of name.