Difference between revisions of "Term.getSize"
From ComputerCraft Wiki
(Finish page) |
([fix] grammar error in comment) |
||
| Line 13: | Line 13: | ||
}} | }} | ||
<!-- | <!-- | ||
| − | If anyone knows how to add | + | If anyone knows how to add a newline in the code, please do in between the getSize and setCursorPos and remove this comment. |
--> | --> | ||
Revision as of 00:05, 3 July 2012
| 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
| Sets the cursor position to the edge of the terminal window. | |
| Code |
local w, h = term.getSize() term.setCursorPos(w,1) |