-
-
Notifications
You must be signed in to change notification settings - Fork 10
Jérôme Leclercq edited this page Dec 8, 2020
·
2 revisions
API: print
Prints its parameter to the execution output.
print(...)
-
...: Variadic parameters to print.
- This function is from the Lua standard (see print in the official Lua manual).
- This function takes variadic parameters, which means it can take from
0tonparameters. - All parameters are converted to string as if tostring was called on them before passing them to this function.
- When called with more than one argument, each printed argument will be separated by a tabulation (
\tcharacter)
-- Prints "Hello world" to the output
print("Hello world")
-- Prints "true 1.24 str vec2(10, 20)" to the output
print(true, 1.24, "str", Vec2(10, 20))
-- Prints the table pointer (something like "table: 0x7f3fbd713598")
print({ "Hello", "World", key = "value" })