stdio.lib
stdio.lib is responsible for standard input/output (the parent process decides the callbacks)
Importing
local stdio = import("stdio.lib")
Methods
out
function stdio.out(data)
- Outputs to stdout the data
- Example usage:
local stdio = import("stdio.lib")
stdio.out("Hello world!") -- if ran by root/bin/console.exe this will output "Hello world" to the screen
inp
function stdio.inp(): string
- Returns stdin data
- Example usage:
local stdio = import("stdio.lib")
stdio.out("What is your name > ")
local name = stdio.inp()
stdio.out("Hello, "..name)
-- if ran by root/bin/console.exe this will output "Hello, " + the given data to the screen