Comprehensive Windows framework to develop in Lua
modules > console > write

console.write ( str1, [str2, str3...])

Writes to the console using console.stdout. Contrary to console.stdout:write(), console.write() can write more than one string, each string is separated with a space character.


str1, str2,...

The strings to write to the console. If the argument is not a string, the function converts it internally using the tostring function.
The function does not return to next line after printing the characters. If you want to add a newline character, use console.writeln() instead.

Return value

The function returns no value.


local console = require "console"

-- prints to the console without returning to line,
-- so that the next characters entered will be printed just after
console.write("What's your name ? ")
local name = console.readln()
console.write("\nHi "" !")