Difference between revisions of "Write"
From ComputerCraft Wiki
Bomb Bloke (Talk | contribs) m (Applies word-wrap.) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
{{Function | {{Function | ||
|name=write | |name=write | ||
− | |args= | + | |args= Mixed data |
|api= | |api= | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc= | + | |desc=Writes characters to the terminal screen. Applies word-wrap, unlike [[Term.write|term.write()]]. |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Writes | + | |desc=Writes Hello World! to the terminal screen. |
|code=write ("Hello ") | |code=write ("Hello ") | ||
write ("World!") | write ("World!") | ||
|output=Hello World! (in one line) | |output=Hello World! (in one line) | ||
}} | }} | ||
− | |notes=*Starts writing where the last write stopped as opposed to [[print | + | |notes=*Starts writing where the last write stopped as opposed to [[print]]() which always prints in a new line. |
*When used at the end of a program, the following prompt will be in the same line. | *When used at the end of a program, the following prompt will be in the same line. | ||
}} | }} | ||
+ | |||
+ | [[Category:Lua_Core_Functions]] |
Latest revision as of 13:10, 22 February 2014
Function write | |
Writes characters to the terminal screen. Applies word-wrap, unlike term.write(). | |
Syntax | write(Mixed data) |
Returns | nil |
Part of | ComputerCraft |
API | none |
Examples
Example | |
Writes Hello World! to the terminal screen. | |
Code |
write ("Hello ") write ("World!") |
Output | Hello World! (in one line) |
Additional Notes
- Starts writing where the last write stopped as opposed to print() which always prints in a new line.
- When used at the end of a program, the following prompt will be in the same line.