Skip to main content

read

Function read 

Source
pub fn read(formats: Repeatable<string>) -> Repeatable<any>
Expand description

Reads from the default input file.

§Parameters

  • ···: read formats, as in file::read (default "l").

§Return value

The values read. Equivalent to io.input():read(···).

§Examples

io.write("what's your name? ")
local name = io.read("l")
print("hello, " .. name)

§See also

file::read, input