term.getSize

Returns the width and height (in characters) of the terminal object.

Standard terminal sizes
Device Width Height
Computer 51 19
Turtle 39 13
Pocket Computer 26 20
Neural Interface 39 13
ExampleGet term size
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

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.