Difference between revisions of "Clear"
From ComputerCraft Wiki
(Add code tags, remove term.clear (has a seperate page Term.clear), and fix grammar errors and stuff) |
|||
Line 2: | Line 2: | ||
== Clear == | == Clear == | ||
− | Clear is a program in | + | Clear is a built-in program in ComputerCraft. |
You may want to use it in a script like: | You may want to use it in a script like: | ||
+ | <pre> | ||
shell.run('clear') | shell.run('clear') | ||
− | print 'Your screen | + | print('Your screen has been cleared!') |
− | This clears the screen so you can write | + | </pre> |
− | + | or just type: | |
− | + | <pre> | |
− | + | clear | |
− | + | </pre> | |
− | + | in the computer. | |
− | + | This clears the screen so you can write text. | |
− | + | '''NOTE: It is not recommended to use the above code in a program, instead use [[Term.clear]]. It is only recommended to use this program to clear the screen through the shell.''' | |
− | + | == term.clear == | |
− | + | For term.clear, visit [[Term.clear]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | == term.clear | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 19:11, 2 September 2012
Clear
Clear is a built-in program in ComputerCraft. You may want to use it in a script like:
shell.run('clear') print('Your screen has been cleared!')
or just type:
clear
in the computer. This clears the screen so you can write text. NOTE: It is not recommended to use the above code in a program, instead use Term.clear. It is only recommended to use this program to clear the screen through the shell.
term.clear
For term.clear, visit Term.clear