Difference between revisions of "Printer.getPageSize"

From ComputerCraft Wiki
Jump to: navigation, search
m (Added integer tag)
(Changing int to number)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=printer.getPageSize
 
|name=printer.getPageSize
|returns=[[int (type)|int]] Width and Height of the Page in the Printer
+
|returns={{type|number}} Width and Height of the Page in the Printer
 
|api=printer
 
|api=printer
 
|addon=ComputerCraft
 
|addon=ComputerCraft

Revision as of 14:03, 18 July 2013


Grid Redstone.png  Function printer.getPageSize
Returns the size of the page.
Syntax printer.getPageSize()
Returns number Width and Height of the Page in the Printer
Part of ComputerCraft
API printer

Examples

Grid paper.png  Example
Prints the size of a page.
Code
local x, y = printer.getPageSize()
print(x ..", ".. y)
Output <width>, <height>