tostring
From ComputerCraft
Jump to navigation
Jump to search
tostring Function | |
---|---|
Syntax tostring(
| |
Returns | string |
API | Base globals |
Source | Lua (source) |
Converts x to a string.
Note: If used on a table, this function will return
table: address
where address is the memory address of the table. To turn the actual table contents into a string, use textutils.serialise.
Note: You can also use
x..""
.
|
|||
Takes the number 64, converts it to a string and then prints it. | |||
Code | local stringFromNumber = tostring(64)
print(stringFromNumber)
|
||
Output | 64
|
Retrieved from "https://wiki.computercraft.cc/index.php?title=Tostring&oldid=5302"