term.getSize

From ComputerCraft
Jump to: navigation, search

term.getSize
Function
Syntax
term.getSize()
Returns number width, number height
API term
Source CC:Tweaked (source)

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
ExampleExampleGet term size
Prints the width and height of the current term.
Code
local width, height = term.getSize()
print(width, height)
Output On computers, 51 19