term.write

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  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

Examples

Grid paper.png  Example
Writes text to the screen at the cursor's current position. 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!")
Output Hello, World!