Difference between revisions of "Term.clear"
From ComputerCraft Wiki
m (moved Term.clear() to Term.clear) |
Bomb Bloke (Talk | contribs) m |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=term.clear | |name=term.clear | ||
| − | + | |returns=[[nil]] | |
| − | |returns= | + | |
|api=term | |api=term | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc=Clears the screen | + | |desc=Clears the screen by overwriting the whole display with blank spaces. The results are affected by the current [[term.setBackgroundColor|background colour]]. |
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Clears | + | |desc=Clears all text on the console or monitor and sets the cursor to coordinate (1, 1) on the screen. |
| − | |code=term.clear() | + | |code=[[term.clear]]()<br />[[term.setCursorPos]](1,1) |
| + | }} | ||
| + | {{Example | ||
| + | |desc=Turns the screen a specified colour | ||
| + | |code=[[term.setBackgroundColor]]([[Color_(API)|colors]].blue)<br>[[term.clear]]() | ||
}} | }} | ||
}} | }} | ||
| + | |||
| + | [[Category:API_Functions]] | ||
Latest revision as of 03:01, 25 June 2014
| Clears the screen by overwriting the whole display with blank spaces. The results are affected by the current background colour. | |
| Syntax | term.clear() |
| Returns | nil |
| Part of | ComputerCraft |
| API | term |
Examples
| Clears all text on the console or monitor and sets the cursor to coordinate (1, 1) on the screen. | |
| Code |
term.clear() |
| Turns the screen a specified colour | |
| Code |
term.setBackgroundColor(colors.blue) |