Difference between revisions of "Printer.write"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{lowercase}} {{Function |name=printer.write |args= string text |returns=Empty string (bug?) |api=none |addon=ComputerCraft |desc=Writes onto the paper |exam...")
 
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=printer.write
 
|name=printer.write
|args= [[string (type)|string]] text
+
|args=[[string (type)|string]] text
|returns=Empty string (bug?)
+
|returns=[[string (type)|string]] ""
 
|api=none
 
|api=none
 
|addon=ComputerCraft
 
|addon=ComputerCraft
Line 12: Line 12:
 
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 after this will be on the same line.
 
|code=printer.write("Hello, World!")
 
|code=printer.write("Hello, World!")
|output=prints "Hello, World!" onto the loaded paper.
+
|output=Prints "Hello, World!" onto the loaded paper.
 
}}
 
}}
 
}}
 
}}

Revision as of 17:32, 26 September 2012


Grid Redstone.png  Function printer.write
Writes onto the paper
Syntax printer.write(string text)
Returns string ""
Part of ComputerCraft
API none

Examples

Grid paper.png  Example
Writes text onto the loaded paper, 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.
Code
printer.write("Hello, World!")
Output Prints "Hello, World!" onto the loaded paper.