Difference between revisions of "Term.write"
From ComputerCraft Wiki
Apemanzilla (Talk | contribs) m |
Bomb Bloke (Talk | contribs) m |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
|name=term.write | |name=term.write | ||
|args= {{Type|string}} text | |args= {{Type|string}} text | ||
− | |||
|api=term | |api=term | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Writes to the screen | + | |desc=Writes text to the screen at the current [[term.setCursorPos|cursor position]], using the current text/background colours as set via [[term.setTextColor]]() / [[term.setBackgroundColor]]() (the defaults being white text on a black background).<br><br> |
+ | |||
+ | Does not apply word-wrap (unlike [[write|write()]]), nor does it automatically move the cursor down a line afterwards (unlike [[print|print()]]). If you wish to use multiple colours in one go, refer to [[term.blit]](). | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Writes text to the screen | + | |desc=Writes text to the screen at the cursor's current position. |
− | This does not produce a new line, and anything else printed or written after this will be on the same line. | + | This does not produce a new line, and anything else printed or written immediately after this will be on the same line. |
|code=term.write("Hello, World!") | |code=term.write("Hello, World!") | ||
|output=Hello, World! | |output=Hello, World! |
Latest revision as of 10:58, 28 June 2015
Function term.write | |
Writes text to the screen at the current cursor position, using the current text/background colours as set via term.setTextColor() / term.setBackgroundColor() (the defaults being white text on a black background). Does not apply word-wrap (unlike write()), nor does it automatically move the cursor down a line afterwards (unlike print()). If you wish to use multiple colours in one go, refer to term.blit(). | |
Syntax | term.write(string text) |
Returns | nil |
Part of | ComputerCraft |
API | term |