term.getSize
Returns the width and height (in characters) of the terminal object.
| Device | Width | Height |
|---|---|---|
| Computer | 51 | 19 |
| Turtle | 39 | 13 |
| Pocket Computer | 26 | 20 |
| Neural Interface | 39 | 13 |
|
|||
| Prints the width and height of the current term. | |||
| Code | <nowiki>
local width, height = term.getSize()
print(width, height)
</nowiki>
|
||
| Output | On computers, 51 19 |
||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| term.getSize Function | |
|---|---|
|
Syntax term.getSize() | |
| Returns | number width, number height |
| API | term |
| Source | CC:Tweaked (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.