tostring
![]()
table: address where address is the memory address of the table. To turn the actual table contents into a string, use textutils.serialise.
| tostring Function | |
|---|---|
|
Syntax tostring(
| |
| Returns | string |
| API | Base globals |
| Source | Lua (source) |
Converts x to a string.
![]()
x.."".
|
|||
| Takes the number 64, converts it to a string and then prints it. | |||
| Code | <nowiki>
local stringFromNumber = tostring(64)
print(stringFromNumber)
</nowiki>
|
||
| Output | 64
|
||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.