Difference between revisions of "Printer.write"
From ComputerCraft Wiki
(Please do not change categories without confirming with me first.) |
MKlegoman357 (Talk | contribs) m (Expanded) |
||
| Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
{{Function | {{Function | ||
| − | |name=printer.write | + | |name=''printer''.write |
| − | |args= | + | |args={{type|string}} text |
| − | |returns= | + | |returns={{type|nil}} |
|api=printer | |api=printer | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc=Writes | + | |desc=Writes text to the paper, works the same way as [[term.write]](). '''This does not produce a new line, and anything else printed or written after this will be on the same line.''' |
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Writes text onto the | + | |desc=Writes text onto the paper and prints it. |
| − | + | |code= local printer = [[peripheral.wrap]]("left") | |
| − | |code=printer. | + | |
| − | + | [[printer.newPage]]() | |
| + | printer.write("Hello, World!") | ||
| + | [[printer.endPage]]() | ||
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] | ||
Latest revision as of 18:04, 9 April 2014
| Writes text to the paper, works the same way as term.write(). This does not produce a new line, and anything else printed or written after this will be on the same line. | |
| Syntax | printer.write(string text) |
| Returns | nil |
| Part of | ComputerCraft |
| API | printer |
Examples
| Writes text onto the paper and prints it. | |
| Code |
local printer = peripheral.wrap("left") printer.newPage() printer.write("Hello, World!") printer.endPage() |