term.getSize

From ComputerCraft Wiki
Revision as of 11:51, 18 July 2013 by Cranium (Talk | contribs) (Changing int to number)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function term.getSize
Returns the width and height of the terminal window.
Syntax term.getSize()
Returns number the width and height of the terminal window.
Part of ComputerCraft
API term

Examples

Grid paper.png  Example
Sets the cursor position to the edge of the terminal window.
Code
local w, h = term.getSize()
term.setCursorPos(w,1)