Difference between revisions of "Term.clear"
From ComputerCraft Wiki
m (Moved to CAT:APIFunctions) |
SuicidalSTDz (Talk | contribs) m (Cleaned up return value, code example description, and added a new example of possible uses with term.clear (there are no args for term.clear and by putting 'none' it could be misleading to new members)) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=term.clear | |name=term.clear | ||
| − | + | |returns=[[nil]] | |
| − | |returns= | + | |
|api=term | |api=term | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| Line 9: | Line 8: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Clears any text on the console or monitor. | + | |desc=Clears any text on the console or monitor, also sets the cursor to position (1, 1) on the screen. |
|code=term.clear()<br />term.setCursorPos(1,1) | |code=term.clear()<br />term.setCursorPos(1,1) | ||
| + | }} | ||
| + | {{Example | ||
| + | |desc=Turns the screen a specified colour | ||
| + | |code=term.setBackgroundColor(colors.blue)<br>term.clear() | ||
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] | ||
Revision as of 14:40, 4 June 2013
| Clears the screen | |
| Syntax | term.clear() |
| Returns | nil |
| Part of | ComputerCraft |
| API | term |
Examples
| Clears any text on the console or monitor, also sets the cursor to position (1, 1) on the screen. | |
| Code |
term.clear() |
| Turns the screen a specified colour | |
| Code |
term.setBackgroundColor(colors.blue) |