Difference between revisions of "Term.getSize"
From ComputerCraft Wiki
(Fix newline) |
|||
Line 9: | Line 9: | ||
{{Example | {{Example | ||
|desc=Sets the cursor position to the edge of the terminal window. | |desc=Sets the cursor position to the edge of the terminal window. | ||
− | |code=local w, h = term.getSize()<br /> term.setCursorPos(w,1) | + | |code=local w, h = term.getSize()<br />term.setCursorPos(w,1) |
}} | }} | ||
}} | }} |
Revision as of 02:53, 3 July 2012
Function term.getSize | |
Returns the width and height of the terminal window. | |
Syntax | term.getSize() |
Returns | The width and height of the terminal window. |
Part of | ComputerCraft |
API | term |
Examples
Example | |
Sets the cursor position to the edge of the terminal window. | |
Code |
local w, h = term.getSize() |