Logo

Programming-Idioms

History of Idiom 120 > diff from v19 to v20

Edit summary for version 20 by :
[Lua] store the read input in variable n

Version 19

2016-04-07, 08:20:32

Version 20

2016-04-07, 08:21:51

Idiom #120 Read integer from stdin

Read an integer value from the standard input into variable n.

Idiom #120 Read integer from stdin

Read an integer value from the standard input into variable n.

Code
io.read("n")
Code
n = io.read("n")
Doc URL
http://www.lua.org/manual/5.3/manual.html#pdf-file:read
Doc URL
http://www.lua.org/manual/5.3/manual.html#pdf-file:read