<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Smiley43210</id>
		<title>ComputerCraft Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Smiley43210"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/Smiley43210"/>
		<updated>2026-07-11T07:54:14Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Peripheral.getMethods&amp;diff=7207</id>
		<title>Peripheral.getMethods</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Peripheral.getMethods&amp;diff=7207"/>
				<updated>2015-08-14T12:50:41Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Formatted example code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=peripheral.getMethods&lt;br /&gt;
|args= {{type|string}} side&lt;br /&gt;
|returns=A table with all available methods for the peripheral on ''side''.&lt;br /&gt;
|api=peripheral&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Returns a table with all available methods for the peripheral on ''side''.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints all of the available methods for the peripheral on the right side of the computer/turtle.&lt;br /&gt;
|code= for i,v in ipairs(peripheral.getMethods(&amp;quot;right&amp;quot;))&lt;br /&gt;
   do print(i..&amp;quot;. &amp;quot;..v)&lt;br /&gt;
 end&lt;br /&gt;
|output=Depends on whatever is attached to the right hand side of the computer; there is a list on the page for the [[Peripheral (API)|peripheral API]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Shell_(API)&amp;diff=7206</id>
		<title>Shell (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Shell_(API)&amp;diff=7206"/>
				<updated>2015-08-14T12:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed variable names to maintain consistency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
The shell API allows you to interface with ComputerCraft's [http://en.wikipedia.org/wiki/Shell_%28computing%29 shell] - [[CraftOS]]. The shell API is only available when programs are ran from the shell or using [[shell.run]]/[[shell.openTab]].&lt;br /&gt;
&lt;br /&gt;
Note that this &amp;quot;API&amp;quot; is not loaded into _G using [[os.loadAPI]]() - instead, it's loaded by [[shell|the shell script itself]] into a separate user environment, one which also holds [http://lua-users.org/wiki/ScopeTutorial global variables] for any other scripts the user executes. [[multishell (API)|The multishell API]] is handled in the same manner. They can thus be easily sandboxed (allowing for multiple shells to run on the same system at once - the APIs for each being able to return relevant results for each instance), though it does mean other APIs can't refer to these functions (as they lack access to the environment table dedicated to user scripts).&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
&lt;br /&gt;
{{API table|shell|image=Grid disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.exit]]()&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Exits the current shell.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.dir]]()&lt;br /&gt;
|{{type|string}} directory&lt;br /&gt;
|Returns the path to the working directory.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.setDir]]({{type|string}} path)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Sets the working directory.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.path]]()&lt;br /&gt;
|{{type|string}} path&lt;br /&gt;
|Returns the path.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.setPath]]({{type|string}} path)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Sets the path.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.resolve]]({{type|string}} localPath)&lt;br /&gt;
|{{type|string}} absolutePath&lt;br /&gt;
|Resolves a local path to an absolute path.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.resolveProgram]]({{type|string}} name)&lt;br /&gt;
|{{type|string}} absolutePath&lt;br /&gt;
|Resolves the absolute path to the program whose name you provided.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.aliases]]()&lt;br /&gt;
|{{type|table}} aliases&lt;br /&gt;
|Returns aliases.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.setAlias]]({{type|string}} alias, {{type|string}} program)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Sets an alias for ''program''.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.clearAlias]]({{type|string}} alias)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Clears an alias.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.programs]]([&amp;lt;nowiki/&amp;gt;{{type|boolean}} showHidden])&lt;br /&gt;
|{{type|table}} programs&lt;br /&gt;
|Returns a table of files in the current directory and in all paths in [[shell.path]].&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.getRunningProgram]]()&lt;br /&gt;
|{{type|string}} path&lt;br /&gt;
|Returns the absolute path to the currently-executing program.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.run]]({{type|string}} command [, {{type|string}} args1, {{type|string}} args2, ...])&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|Runs a command (program).&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.openTab]]({{type|string}} command [, {{type|string}} args1, {{type|string}} args2, ...])&lt;br /&gt;
|{{type|number}} tabID&lt;br /&gt;
|Runs a program in another [[multishell]] tab. ''Requires version 1.6 or newer and an advanced system.''}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.switchTab]]({{type|number}} tabID)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Switches the [[multishell]] tab to tab with the given ID.  ''Requires version 1.6 or newer and an advanced system.''&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.complete]]({{type|string}} prefix)&lt;br /&gt;
|{{type|table}} completionList&lt;br /&gt;
|Given a partial command line, returns a list of suffixes that could potentially be used to complete it.  ''Requires version 1.74 or newer.''}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.completeProgram]]({{type|string}} prefix)&lt;br /&gt;
|{{type|table}} completionList&lt;br /&gt;
|Given a partial script / directory path, returns a list of suffixes that could potentially be used to complete it, including [[shell.aliases|alias]] and [[shell.path|path]] matches.  ''Requires version 1.74 or newer.''&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.setCompletionFunction]]({{type|string}} path, {{type|function}} completionFunction)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Registers a function that determines how [[shell.complete]]() handles completion behavior for a given script. ''Requires version 1.74 or newer.''}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[shell.getCompletionInfo]]()&lt;br /&gt;
|{{type|table}} completionFunctions&lt;br /&gt;
|Returns a pointer to the table containing functions registered by [[shell.setCompletionFunction]]() for use with [[shell.complete]](). ''Requires version 1.74 or newer.''&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that [[shell.run]] and [[shell.openTab]] concatenate any arguments they are given (with single space separator characters) before parsing the command, and as of ComputerCraft version 1.45, now also support a single string containing ''all'' parameters.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.detectUp&amp;diff=7205</id>
		<title>Turtle.detectUp</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.detectUp&amp;diff=7205"/>
				<updated>2015-08-14T12:25:09Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Edited example description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.detectUp&lt;br /&gt;
|args=&lt;br /&gt;
|api=turtle&lt;br /&gt;
|returns={{type|boolean}} is there a block above the turtle?&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Detects if there is a block above the turtle.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=The turtle checks if there is a block above it, and if there is, it digs it.&lt;br /&gt;
|code= if '''turtle.detectUp()''' then&lt;br /&gt;
   [[turtle.digUp]]()&lt;br /&gt;
 end&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
==See also==&lt;br /&gt;
*[[turtle.detect]]&lt;br /&gt;
*[[turtle.detectDown]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Commands.exec&amp;diff=7204</id>
		<title>Commands.exec</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Commands.exec&amp;diff=7204"/>
				<updated>2015-08-14T12:14:54Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=commands.exec&lt;br /&gt;
|args={{type|string}} command&lt;br /&gt;
|returns={{type|boolean}} success, {{type|table}} output&lt;br /&gt;
|api=commands&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Available only to [[Command Computer]]s, executes the specified [http://minecraft.gamepedia.com/Commands Minecraft command], [[os.pullEvent|yields]] until the result is determined, then returns it. If command executes successfully then it returns &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; + the output of the command as a numerically-indexed table, otherwise returns &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; + an error message as as a numerically-indexed table. Compare [[commands.execAsync]], which ignores the result and returns immediately, without yielding.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In ComputerCraft 1.71+ instead of just returning a {{type|boolean}} and an optional error message ({{type|string}}) this function also returns the output of the command in a numerically-indexed table, where each line of the output is put in a separate index. This output is the same as if you would run the command in chat. See example below for an example of this table.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
As of ComputerCraft 1.71 this function is also available in the global environment ( &amp;lt;var&amp;gt;_G&amp;lt;/var&amp;gt; ) as just &amp;lt;var&amp;gt;exec&amp;lt;/var&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Most commands returned by [[commands.list]]() are also available as functions, such that ''commands.exec(command)'' could also be written as ''commands.command(par1, par2, ...)'' - eg, ''commands.exec(&amp;quot;msg @p Hello world!&amp;quot;)'' becomes ''commands.msg(&amp;quot;@p Hello world!&amp;quot;)''.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Says 'Hello' to the player, closest to the [[Command Computer]].&lt;br /&gt;
|code='''commands.exec( &amp;quot;say @p Hello&amp;quot; )'''&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Checks if there are any players around the [[Command Computer]] in 2 block radius.&lt;br /&gt;
|code=local radius = 2&lt;br /&gt;
 local arePlayersAround = '''commands.exec( &amp;quot;testfor @a[r=&amp;quot; .. radius .. &amp;quot;]&amp;quot;)'''&lt;br /&gt;
 &lt;br /&gt;
 if arePlayersAround then&lt;br /&gt;
   [[print]]( &amp;quot;There is one or more players around me.&amp;quot; )&lt;br /&gt;
 else&lt;br /&gt;
   [[print]]( &amp;quot;There are no players around me.&amp;quot; )&lt;br /&gt;
 end&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints the output after running the command &amp;quot;help&amp;quot;. ''Requires ComputerCraft 1.71+.''&lt;br /&gt;
|code=local success, output = '''commands.exec( &amp;quot;help&amp;quot; )'''&lt;br /&gt;
 &lt;br /&gt;
 if success then&lt;br /&gt;
   [[print]]( [[textutils.serialize]]( output ) )&lt;br /&gt;
 end&lt;br /&gt;
|output=Example output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;--- Showing help page 1 of 5 (/help &amp;lt;page&amp;gt;) ---&amp;quot;,&lt;br /&gt;
   &amp;quot;/achievement give &amp;lt;stat_name&amp;gt; [player]&amp;quot;,&lt;br /&gt;
   &amp;quot;/clear &amp;lt;player&amp;gt; [item] [data]&amp;quot;,&lt;br /&gt;
   &amp;quot;/defaultgamemode &amp;lt;mode&amp;gt;&amp;quot;,&lt;br /&gt;
   &amp;quot;/difficulty &amp;lt;new difficulty&amp;gt;&amp;quot;,&lt;br /&gt;
   &amp;quot;/effect &amp;lt;player&amp;gt; &amp;lt;effect&amp;gt; [seconds] [amplifier]&amp;quot;,&lt;br /&gt;
   &amp;quot;/enchant &amp;lt;player&amp;gt; &amp;lt;enchantment ID&amp;gt; [level]&amp;quot;,&lt;br /&gt;
   &amp;quot;Use /forge &amp;lt;subcommand&amp;gt;. Subcommands are tps, track&amp;quot;,&lt;br /&gt;
 }&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{CommandsAPIFunctions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Commands.getBlockPosition&amp;diff=7203</id>
		<title>Commands.getBlockPosition</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Commands.getBlockPosition&amp;diff=7203"/>
				<updated>2015-08-14T12:14:41Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=commands.getBlockPosition&lt;br /&gt;
|args=&lt;br /&gt;
|returns={{type|number}} x, {{type|number}} y, {{type|number}} z&lt;br /&gt;
|api=commands&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Available only to [[Command Computer]]s, returns the Minecraft world co-ordinates of the computer running the command.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints the coordinates of the [[Command Computer]] running the function.&lt;br /&gt;
|code=local x, y, z = '''commands.getBlockPosition()'''&lt;br /&gt;
 &lt;br /&gt;
 [[print]]( &amp;quot;Command Computer's position:&amp;quot; )&lt;br /&gt;
 [[print]](&amp;quot;X: &amp;quot;, x)&lt;br /&gt;
 [[print]](&amp;quot;Y: &amp;quot;, y)&lt;br /&gt;
 [[print]](&amp;quot;Z: &amp;quot;, z)&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{CommandsAPIFunctions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Commands.getBlockInfo&amp;diff=7202</id>
		<title>Commands.getBlockInfo</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Commands.getBlockInfo&amp;diff=7202"/>
				<updated>2015-08-14T12:14:28Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=commands.getBlockInfo&lt;br /&gt;
|args={{type|number}} x, {{type|number}} y, {{type|number}} z&lt;br /&gt;
|returns={{type|table}} block info&lt;br /&gt;
|api=commands&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Available only to [[Command Computer]]s, returns a table containing information on the block at the specified world co-ordinate, formatted as follows:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   name = {{type|string}} block's name,&lt;br /&gt;
   metadata = {{type|number}} block's metadata&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The block inspected will be in the same dimension as the computer. This function yields until the data is available to be returned. If the queried block exists in an ungenerated chunk, this function will cause that chunk to be generated.&lt;br /&gt;
&lt;br /&gt;
See also: [http://minecraft.gamepedia.com/Data_values Data Values @ Minecraft wiki]&lt;br /&gt;
&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints the [[Command Computer]]'s internal name and metadata value.&lt;br /&gt;
|code=local blockInfo = '''commands.getBlockInfo( [[commands.getBlockPosition]]() )'''&lt;br /&gt;
 &lt;br /&gt;
 [[print]]( &amp;quot;Computer block's name: &amp;quot;, blockInfo.name )&lt;br /&gt;
 [[print]]( &amp;quot;Computer block's metadata: &amp;quot;, blockInfo.metadata )&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints the facing of the [[Command Computer]] running the script by inspecting its own metadata.&lt;br /&gt;
|code=local directions = {&amp;quot;unknown&amp;quot;, &amp;quot;north&amp;quot;, &amp;quot;south&amp;quot;, &amp;quot;west&amp;quot;, &amp;quot;east&amp;quot;}&lt;br /&gt;
 local blockInfo = '''commands.getBlockInfo( [[commands.getBlockPosition]]() )'''&lt;br /&gt;
 &lt;br /&gt;
 [[print]]( &amp;quot;My facing is &amp;quot;, directions[ blockInfo.metadata ], &amp;quot;.&amp;quot; )&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{CommandsAPIFunctions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Commands_(API)&amp;diff=7201</id>
		<title>Commands (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Commands_(API)&amp;diff=7201"/>
				<updated>2015-08-14T12:14:11Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Only available to the fabled [[Command Computer]] (itself only available to ops in creative mode, running CC 1.7 or later), the '''commands API''' allows your system to directly execute [http://minecraft.gamepedia.com/Commands Minecraft commands] and gather data from the results.&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
{{API table|commands|image=Grid_disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[commands.exec]]({{type|string}} command)&lt;br /&gt;
|{{type|boolean}} success, {{type|table}} output&lt;br /&gt;
|Executes the specified command, yields until the result is determined, then returns it.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[commands.execAsync]]({{type|string}} command)&lt;br /&gt;
|{{type|number}} taskID&lt;br /&gt;
|Executes the specified command, but doesn't yield. Queues a [[task_complete_(event)|&amp;quot;task_complete&amp;quot;]] event after the command is executed.&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[commands.list]]()&lt;br /&gt;
|{{type|table}} commands&lt;br /&gt;
|Returns a numerically indexed table filled with strings representing acceptable commands for [[commands.exec]]() / [[commands.execAsync]]().&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[commands.getBlockPosition]]()&lt;br /&gt;
|{{type|number}} x, {{type|number}} y, {{type|number}} z&lt;br /&gt;
|Returns the Minecraft world coordinates of the computer running the command.&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[commands.getBlockInfo]]({{type|number}} x, {{type|number}} y, {{type|number}} z)&lt;br /&gt;
|{{type|table}} block info&lt;br /&gt;
|Returns a table containing info about the block at the specified world location. Keys are &amp;quot;name&amp;quot; (a string) and &amp;quot;metadata&amp;quot; (a number).&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==commands.&amp;lt;command&amp;gt;()/commands.async.&amp;lt;command&amp;gt;()==&lt;br /&gt;
Every command returned by [[commands.list]]() is available as commands.''command'' and commands.async.''command''. For example, instead of writing this:&lt;br /&gt;
&lt;br /&gt;
 [[commands.exec]](&amp;quot;say Hi&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
...you can write:&lt;br /&gt;
&lt;br /&gt;
 commands.say(&amp;quot;Hi&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Same with async:&lt;br /&gt;
&lt;br /&gt;
 [[commands.execAsync]](&amp;quot;say Hi&amp;quot;)&lt;br /&gt;
 ''-- same as:''&lt;br /&gt;
 commands.async.say(&amp;quot;Hi&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
On top of that you can pass to them multiple parameters including strings, numbers, booleans and tables. All those parameters are [[textutils.serializeJSON|serialized]] if necessary (such as tables) and concatenated into one string. All these functions will run the same command with the same parameters:&lt;br /&gt;
&lt;br /&gt;
 [[commands.exec]](&amp;quot;tellraw @p {text:'Hello!',bold:true}&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 commands.tellraw(&amp;quot;@p {text:'Hello!',bold:true}&amp;quot;) ''-- one or more parameters may be put into one string''&lt;br /&gt;
 &lt;br /&gt;
 commands.tellraw(&amp;quot;@p&amp;quot;, &amp;quot;{text:'Hello!',bold:true}&amp;quot;) ''-- or you can separate them to different parameters''&lt;br /&gt;
 &lt;br /&gt;
 commands.tellraw(&amp;quot;@p&amp;quot;, {text=&amp;quot;Hello!&amp;quot;, bold=true}) ''-- you can also pass a {{type|table}} directly to it''&lt;br /&gt;
&lt;br /&gt;
The same applies for commands.async.&amp;lt;command&amp;gt;().&lt;br /&gt;
&lt;br /&gt;
All the commands inside commands.&amp;lt;command&amp;gt;()/commands.async.&amp;lt;command&amp;gt;() are also case insensitive. Running commands.TellRAW( ... ) is the same as running commands.tellraw( ... ).&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*ComputerCraft enforces a limit of 1000 commands per server tick on Command Computers. Consider [[os.pullEvent|yielding]] manually every so often (eg, sleeping for a second) when making large amounts of [[commands.execAsync]] calls.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Adventure&amp;diff=7200</id>
		<title>Adventure</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Adventure&amp;diff=7200"/>
				<updated>2015-08-14T12:12:00Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:2012-01-30 22.51.59.png|frame|right|Gameplay of Adventure.]]Adventure is one of the default programs in CraftOs. Adventure emulates a text adventure, but it takes place in Minecraft.  Therefore, it is possible to play Minecraft, on a computer, in Minecraft, on a computer. This is referred to as &amp;quot;recursion&amp;quot;. Also most LPs consist of LPers playing Adventure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more ingame info type: &amp;quot;help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone_(API)&amp;diff=7199</id>
		<title>Redstone (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone_(API)&amp;diff=7199"/>
				<updated>2015-08-14T12:11:34Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Redstone API contains methods to control attached redstone. All methods from the redstone API can also be called using &amp;quot;rs&amp;quot;, which points to the same library. For example, instead of redstone.getSides(), rs.getSides() can be used.&lt;br /&gt;
&lt;br /&gt;
In addition to regular redstone / RedPower cables for regular signals, [[Redstone_(API)#Bundled_Cables|bundled cables]] may be used to send/receive &amp;quot;combined&amp;quot; signals through the one face. The [[Colors (API)|Colors API]] offers functions that're helpful information in dealing with these.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Redstone (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getSides]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a table of possible sides.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getInput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the current redstone input signal state on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.setOutput]]({{type|string}} side, {{type|boolean}} value)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets or resets a redstone signal on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getOutput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the current redstone output signal on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getAnalogInput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;'''(Requires CC1.51 and above)''' Returns the current redstone input signal strength on ''side''. If no input is present, returns 0. If a redstone source (such as a redstone torch or block) is directly adjacent to the computer, returns 15.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.setAnalogOutput]]({{type|string}} side, {{type|number}} strength)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;'''(Requires CC1.51 and above)''' Sets or resets a redstone signal on ''side'' to ''strength'' (where ''strength'' is a positive integer).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getAnalogOutput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;'''(Requires CC1.51 and above)''' Returns the current redstone output signal strength on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getBundledInput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the state (as a number) of a [[Redstone_(API)#Bundled_Cables|bundled cable]] connected to ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getBundledOutput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the set of wires in a [[Redstone_(API)#Bundled_Cables|bundled cable]] which are being activated by the terminal on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.setBundledOutput]]({{type|string}} side, {{type|number}} colors)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets one or multiple colored signals in a [[Redstone_(API)#Bundled_Cables|bundled cable]] attached to ''side''. ''colors'' will determine which signals are activated. In order to set multiple signals, [[colors.combine|add the color values of the colors]] you want to activate. To turn off all of the colors, use 0.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.testBundledInput]]({{type|string}} side, {{type|number}} color)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns true if ''color'' is active in a [[Redstone_(API)#Bundled_Cables|bundled cable]] attached to ''side''. Else, returns false.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| ''[[Usage_of_the_bundled_cable_using_the_Redstone_API|Bundled cable code snippet. (You might want to take a look at this if you are doing bundledcable related things.)]]''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data exchange ==&lt;br /&gt;
The redstone API can be used to exchange data between adjacent [[computer]]s and [[turtle]]s. Four bits of data can be transmitted and received with each use of redstone signals to send analog output and receive the input. One redstone signal can be sent at each tick [http://minecraft.gamepedia.com/Tick tick], and there are 20 ticks per second in Minecraft. This limits data transmission over redstone to a maximum of 80 bits per second (bps).&lt;br /&gt;
&lt;br /&gt;
This makes large-scale data transmission over the redstone API exceedingly slow. For example, using the redstone API, transmitting a colored bitmap image for a maximum [[resolution]] computercraft monitor cluster (162x80 pixels) would require 10 minutes and 48 seconds (this would be a 6.48 kB image). For reference, there are 16 colors available for monitors and terminals in computercraft, so a single color for a pixel can be represented in a 4-bit signal.&lt;br /&gt;
&lt;br /&gt;
Despite the slowness, the redstone API can be useful when other options are not available. For example, it can be used to allow [[turtle]]s to communicate with each other and coordinate their work even if they do not have [[Wireless Modem]]s. Exchanging instructions can be done with much less total data than exchanges of image files and the like.&lt;br /&gt;
&lt;br /&gt;
==Bundled Cables==&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;bundled cable&amp;quot; contains multiple wires, one for each of the basic 16 dye colors present in Minecraft. Each acts as a redstone dust line, allowing multiple redstone signals to pass through a space without interfering with each other. They are extremely handy for building complex control mechanisms, and can be dealt with using the [[redstone.getBundledInput|rs.getBundledInput]], [[redstone.getBundledOutput|rs.getBundledOutput]], [[redstone.setBundledOutput|rs.setBundledOutput]] and [[redstone.testBundledInput|rs.testBundledInput]] functions.&lt;br /&gt;
&lt;br /&gt;
ComputerCraft itself does not offer any form of bundled cable - rather, such 16-wire leads are provided by other mods, and they aren't always specifically called &amp;quot;bundled cables&amp;quot;, either. Compatibility has changed over time.&lt;br /&gt;
&lt;br /&gt;
ComputerCraft 1.1 (for Minecraft 1.0) through to 1.5 (for MC 1.4.7) users have access to [http://ftbwiki.org/Bundled_Cable bundled cables], provided by [http://www.eloraam.com RedPower/RedPower 2].&lt;br /&gt;
&lt;br /&gt;
1.51 (for MC 1.5) through to 1.58 (for MC 1.6.4) users can switch to [http://ftbwiki.org/RedNet_Cable RedNet cables] (nothing to do with [[Rednet_(API)|ComputerCraft's Rednet]]!) from [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292152-powercrystals-mods-minefactoryreloaded#mfr MineFactory Reloaded].&lt;br /&gt;
&lt;br /&gt;
1.6 introduced an API allowing other mod authors to code support into their mods, while at the same time dropping in-built support for RedNet cables. No known leads are compatible with ComputerCraft 1.6 to 1.63 (for MC 1.6.4) - stick to 1.58 and its RedNet cable compatibility if you wish to use them under that build of Minecraft.&lt;br /&gt;
&lt;br /&gt;
Under 1.64 through to the present 1.74 (all for MC 1.7.10), a number of cables are now available - [http://projectredwiki.com/wiki/Bundled_Cable bundled cables] from [http://projectredwiki.com/wiki/Main_Page Project Red], [http://wiki.enderio.com/Insulated_Redstone_Conduit Insulated Redstone Conduits] from [http://wiki.enderio.com/Main_Page Ender IO], and it's believed current versions of MineFactory Reloaded also work again via their RedNet cables. Others may be available too, so experiment with what you've got, and remember to try updating your mods if you're having trouble!&lt;br /&gt;
&lt;br /&gt;
Mod authors wishing to make their cables compatible can inspect api/doc/index.html, within the ComputerCraft mod archive, for details.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Rednet_(API)&amp;diff=7198</id>
		<title>Rednet (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Rednet_(API)&amp;diff=7198"/>
				<updated>2015-08-14T12:10:47Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''For a tutorial on how to use the API, visit [[Rednet Tutorial]].''&lt;br /&gt;
&lt;br /&gt;
The Rednet API allows systems to communicate between each other without using redstone. It serves as a wrapper for the [[modem (API)|modem API]], offering ease of functionality (particularly in regards to [[Repeat|repeating signals]]) with some expense of fine control. &lt;br /&gt;
&lt;br /&gt;
In order to send and receive data, a [[modem]] (either [[Wired Modem|wired]] or [[Wireless Modem|wireless]]) is required. The data reaches any possible destinations immediately after sending it, but is [[#Range|range limited]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
{{API table|rednet|image=Grid_disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.open]]({{type|string}} side)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Tells the computer that the side can be used for networking.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.close]]({{type|string}} side)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Tells the computer that the side can no longer be used for networking.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.send]]({{type|number}} receiverID, {{type|any}} message, [&amp;lt;nowiki/&amp;gt;{{type|string}} protocol])&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Sends a message &amp;quot;intended&amp;quot; for another system with a specific ID, using the currently opened sides. The &amp;lt;var&amp;gt;receiverID&amp;lt;/var&amp;gt; is the ID {{type|number}} (note - '''not''' a {{type|string}}) of the computer you're sending the message to. The [[Variables|types]] that can be sent as the message vary depending on the version of ComputerCraft in use.}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.broadcast]]({{type|any}} message, [&amp;lt;nowiki/&amp;gt;{{type|string}} protocol])&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Sends the message to ''all'' connected and open computers.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.receive]]([&amp;lt;nowiki/&amp;gt; [&amp;lt;nowiki/&amp;gt;{{type|string}} protocolFilter, ] {{type|number}} timeout])&lt;br /&gt;
|{{type|number}} senderID, {{type|any}} message, {{type|number}} distance / {{type|string}} protocol&lt;br /&gt;
|Waits until a rednet message of the specified protocol has been received, or until &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; seconds have passed. Leave all arguments empty to wait for any message indefinitely. If only a single, numerical argument is passed, will wait that many seconds for a message of any protocol. Versions of ComputerCraft prior to 1.6 may return the distance to the transmitting computer - 1.6 or later returns message protocols instead, though distance can still be obtained via direct use of the [[Modem (API)|Modem API]].}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.isOpen]]({{type|string}} side)&lt;br /&gt;
|{{type|boolean}} isOpen&lt;br /&gt;
|Returns [[Boolean_(type)|true]] if the wireless modem is open.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.host]]({{type|string}} protocol, {{type|string}} hostname)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Registers &amp;lt;var&amp;gt;hostname&amp;lt;/var&amp;gt; against &amp;lt;var&amp;gt;protocol&amp;lt;/var&amp;gt; for the purposes of [[rednet.lookup]](). '''Only available in ComputerCraft 1.6 and above.'''}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.unhost]]({{type|string}} protocol, {{type|string}} hostname)&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Unregisters &amp;lt;var&amp;gt;hostname&amp;lt;/var&amp;gt; from &amp;lt;var&amp;gt;protocol&amp;lt;/var&amp;gt;. '''Only available in ComputerCraft 1.6 and above.'''&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.lookup]]({{type|string}} protocol, {{type|string}} hostname)&lt;br /&gt;
|{{type|number}} ID1, {{type|number}} ID2, ...&lt;br /&gt;
|Searches the local network for systems registered with a matching &amp;lt;var&amp;gt;hostname&amp;lt;/var&amp;gt; and/or &amp;lt;var&amp;gt;protocol&amp;lt;/var&amp;gt;, and returns matching IDs found. '''Only available in ComputerCraft 1.6 and above.'''&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.run]]()&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Internal use function - runs automatically and does not need to be called directly. Waits for [[Modem_message_(event)|modem_message]] events to appear within the event queue and generates corresponding [[Rednet_message_(event)|rednet_message]] events for use with this API. Also responds to [[rednet.lookup]]() requests.&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Events==&lt;br /&gt;
{{Event|name=[[rednet_message_(event)|rednet_message]]&lt;br /&gt;
|desc=Fired when a rednet message is received (can be pulled via [[os.pullEvent|os.pullEvent()]] directly as an alternative to using [[rednet.receive|rednet.receive()]]).&lt;br /&gt;
|return1={{type|number}} senderId&lt;br /&gt;
|return2={{type|any}} message&lt;br /&gt;
|return3={{type|number}} distance / {{type|string}} protocol&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Range==&lt;br /&gt;
The range of a wireless network transmission can be determined via the following formula:&lt;br /&gt;
&lt;br /&gt;
 minRange + (position.yCoord - 96.0) * ((maxRange - minRange) / ((world.getHeight() - 1) - 96.0))&lt;br /&gt;
&lt;br /&gt;
Where, by default:&lt;br /&gt;
&lt;br /&gt;
 minRange = 64  (or 16 in a storm)&lt;br /&gt;
 maxRange = 384 (or 96 in a storm)&lt;br /&gt;
 world.getHeight() = 256&lt;br /&gt;
&lt;br /&gt;
Catch is, that formula is quite capable of returning values that are well below 0... More research is required, it seems. Anyway, min/max range figures can be altered in [[ComputerCraft.cfg]], and the maximum range of a system located at world height will generally be equal to the maxRange for the current weather.&lt;br /&gt;
&lt;br /&gt;
Even for the purposes of two-way communications, only the system with the best range is checked - a system located at the bottom of the world may hence send to and receive from a system at the top. Range is calculated in three dimensions, so the area a given system can reach wirelessly is represented by a sphere.&lt;br /&gt;
&lt;br /&gt;
For wired networks, range between devices is 256 blocks of [[Networking_Cable|network cable]] (unconfigurable). Either method of communication works regardless as to whether the intervening chunks are loaded or not.&lt;br /&gt;
&lt;br /&gt;
As of ComputerCraft 1.6, a [[Repeat|repeater script]] is available to all systems by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Protocols==&lt;br /&gt;
Introduced by ComputerCraft 1.6, &amp;quot;protocols&amp;quot; are simple string names indicating what [[rednet.send|sent messages]] are about. [[rednet.receive|Receiving systems]] may filter messages according to their protocols, thereby automatically ignoring incoming messages which don't specify an identical string. It's also possible to [[rednet.lookup|lookup]] which systems in the area are interested in certain protocols, hence making it easier to determine where given messages should be sent in the first place.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
Before the creation of the in-game wireless networking API, the term &amp;quot;Rednet&amp;quot; referred to a system created by a ComputerCraft user based on bundled cables from the popular Minecraft mod [http://www.eloraam.com RedPower]. That also allowed communication between computers, but the data was transferred slowly - every bit was converted to redstone signal (using the [[redstone (API)|redstone API]]) that lasted about 0.05 seconds (the length of a Minecraft &amp;quot;tick&amp;quot;). That system was rendered redundant by the release of ComputerCraft 1.3, as this heralded the arrival of [[Wireless Modem|wireless networking]] to the mod and allowed instant communications between computers.&lt;br /&gt;
&lt;br /&gt;
Later, ComputerCraft 1.51 brought forward [[Wired Modem]]s, which could not only be used for regular network communications, but to interact with [[peripheral]]s remotely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Security==&lt;br /&gt;
In current versions of ComputerCraft (1.5 or later), Rednet is not to be considered a &amp;quot;secure&amp;quot; method of communication. The identity data indicating who sent a given message is set ''by the sender'', and hence cannot be trusted. Messages intended for a given system may be received and read by any other system in range.&lt;br /&gt;
&lt;br /&gt;
This is because Rednet is simply a convenience wrapper for the [[modem (API)|modem API]], and while it typically sends/receives using channel numbers matching the IDs of systems you control, the latter offers ''complete control'' over channel usage. Another user can hence easily task the modem API directly to sniff and find out what messages a computer is receiving if he knows (or can even guess) its ID, or pretend to send from any ID he wishes.&lt;br /&gt;
&lt;br /&gt;
When using Rednet for anything with security implications, be sure to implement your own methods of protection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Deprecated Functions==&lt;br /&gt;
{{Deprecated&lt;br /&gt;
|plural=yes&lt;br /&gt;
|type=These functions&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{API table|Deprecated Rednet Functions|image=Grid disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row&lt;br /&gt;
|[[rednet.announce]]()&lt;br /&gt;
|{{type|nil}}&lt;br /&gt;
|Broadcasts an empty rednet message. Removed from ComputerCraft by version ''1.5'' in favor of [[rednet.broadcast]]()&lt;br /&gt;
|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Command_Computer&amp;diff=7197</id>
		<title>Command Computer</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Command_Computer&amp;diff=7197"/>
				<updated>2015-08-14T12:08:41Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Block&lt;br /&gt;
|name=Command Computer&lt;br /&gt;
|image=Iso_Command_Computer.png&lt;br /&gt;
|id=ComputerCraft:command_computer&lt;br /&gt;
|damage-value=0&lt;br /&gt;
|is-peripheral=[[#Peripheral_Functions|Yes]]&lt;br /&gt;
}}&lt;br /&gt;
Introduced by ComputerCraft 1.7 (and therefore requiring Minecraft 1.7.10 or later), the Command Computer is a more powerful version of the [[Advanced Computer]], having direct access to [http://minecraft.gamepedia.com/Commands Minecraft commands]. They are therefore uncraftable, only available to op-status players via the creative inventory, and can only be directly interacted with by the same such players. For example, unlike other computers, they will not boot from an external [[Disk Drive]].&lt;br /&gt;
&lt;br /&gt;
Although regular players cannot ''directly'' access these systems, it's quite possible to write scripts that allow them a controlled level of interaction via the touch-sensitive [[Advanced Monitor]] block, or via [[Rednet (API)|Rednet]], or via other [[peripheral]]s.&lt;br /&gt;
&lt;br /&gt;
==Exclusive APIs==&lt;br /&gt;
*[[Commands (API)]]&lt;br /&gt;
&lt;br /&gt;
==Exclusive Programs==&lt;br /&gt;
*[[commands]]&lt;br /&gt;
*[[exec]]&lt;br /&gt;
&lt;br /&gt;
== Peripheral Functions ==&lt;br /&gt;
Supports all the methods available to a [[Computer]] or [[Turtle]].&lt;br /&gt;
*[[Computer (API)]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BlocksItemsList}}&lt;br /&gt;
[[Category:Blocks]][[Category:Consoles]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=7196</id>
		<title>Gps (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=7196"/>
				<updated>2015-08-14T12:07:25Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;axises&amp;quot; to &amp;quot;axes&amp;quot;, changed formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GPS API provides a method for turtles and computers to retrieve their own locations.&lt;br /&gt;
&lt;br /&gt;
It broadcasts a PING message over [[Rednet_(API)|rednet]] and wait for responses. In order for this system to work, there must be at least 4 computers used as gps ''hosts'' which will respond and allow [[Wikipedia:Trilateration|trilateration]]. Three of these hosts should be in a plane, and the fourth should be either above or below the other three. The three in a plane should not be in a line with each other. You can set up hosts using the [[Gps (program)|gps program]].&lt;br /&gt;
&lt;br /&gt;
Note:  When entering in the coordinates for the ''host'' you need to put in the x, y, and z coordinates of the '''computer''', not the modem, as all rednet distances are measured from the block the computer is in. &lt;br /&gt;
&lt;br /&gt;
Also note that you may ''choose'' which axes x, y, or z refers to - so long as your systems have the same definition as any GPS servers that're in range, it works just the same. For example, you might build a GPS cluster according to [http://www.computercraft.info/forums2/index.php?/topic/3088-how-to-guide-gps-global-position-system/ this tutorial], using z to account for height, or you might use y to account for height in the way that Minecraft's debug screen displays.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- do not edit this without actually testing it yourself --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{API table|Gps|image=Grid_disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row|gps.locate(&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;{{type|number}} timeout [, {{Type|boolean}} debug]])|({{Type|number}} x, {{Type|number}} y, {{Type|number}} z) or {{Type|nil}}|Tries to retrieve the computer or turtles own location. On success, returns the location of the turtle’s modem. On failure (if no responses are received for &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; seconds, by default 2), returns {{Type|nil}}. If &amp;lt;var&amp;gt;debug&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, debug messages are printed.|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
  print(&amp;quot;Man I am so lost right now!&amp;quot;)&lt;br /&gt;
  local x, y, z = gps.locate(5)&lt;br /&gt;
  if not x then --If gps.locate didn't work, it won't return anything. So check to see if it did.&lt;br /&gt;
    print(&amp;quot;Failed to get my location!&amp;quot;)&lt;br /&gt;
  else&lt;br /&gt;
    print(&amp;quot;I am at (&amp;quot; .. x .. &amp;quot;, &amp;quot; .. y .. &amp;quot;, &amp;quot; .. z .. &amp;quot;)&amp;quot;) --This prints 'I am at (1, 2, 3)' or whatever your coordinates are&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Vector Example ==&lt;br /&gt;
GPS position and navigation can be handled more easily using a [[vector (API)|vector]].&lt;br /&gt;
&lt;br /&gt;
  local home = vector.new(45, 85, 20)&lt;br /&gt;
  local position = vector.new(gps.locate(5))&lt;br /&gt;
  local displacement = position - home&lt;br /&gt;
  &lt;br /&gt;
  print(&amp;quot;I am &amp;quot;, tostring(displacement), &amp;quot; away from home!!!&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=6941</id>
		<title>Gps (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=6941"/>
				<updated>2015-03-20T05:59:46Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed &amp;quot;MineCraft&amp;quot; to &amp;quot;Minecraft&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GPS API provides a method for turtles and computers to retrieve their own locations.&lt;br /&gt;
&lt;br /&gt;
It broadcasts a PING message over [[Rednet_(API)|rednet]] and wait for responses. In order for this system to work, there must be at least 4 computers used as gps ''hosts'' which will respond and allow [[Wikipedia:Trilateration|trilateration]]. Three of these hosts should be in a plane, and the fourth should be either above or below the other three. The three in a plane should not be in a line with each other. You can set up hosts using the [[Gps (program)|gps program]].&lt;br /&gt;
&lt;br /&gt;
Note:  When entering in the coordinates for the ''host'' you need to put in the x,y,z of the computer, not the modem, as all rednet distances are measured from the block the computer is in. &lt;br /&gt;
&lt;br /&gt;
Also note that you may ''choose'' which axises x, y or z refers to - so long as your systems have the same definition as any GPS servers that're in range, it works just the same. For example, you might build a GPS cluster according to [http://www.computercraft.info/forums2/index.php?/topic/3088-how-to-guide-gps-global-position-system/ this tutorial], using z to account for height, or you might use y to account for height in the way that Minecraft's debug screen displays.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- do not edit this without actually testing it yourself --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{API table|Gps|image=Grid_disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row|gps.locate(&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;{{type|number}} timeout [, {{Type|boolean}} debug]])|({{Type|number}} x, {{Type|number}} y, {{Type|number}} z) or {{Type|nil}}|Tries to retrieve the computer or turtles own location. On success, returns the location of the turtle’s modem. On failure (if no responses are received for &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; seconds, by default 2), returns {{Type|nil}}. If &amp;lt;var&amp;gt;debug&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, debug messages are printed.|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
  print(&amp;quot;Man I am so lost right now!&amp;quot;)&lt;br /&gt;
  local x, y, z = gps.locate(5)&lt;br /&gt;
  if not x then --If gps.locate didn't work, it won't return anything. So check to see if it did.&lt;br /&gt;
    print(&amp;quot;Failed to get my location!&amp;quot;)&lt;br /&gt;
  else&lt;br /&gt;
    print(&amp;quot;I am at (&amp;quot; .. x .. &amp;quot;, &amp;quot; .. y .. &amp;quot;, &amp;quot; .. z .. &amp;quot;)&amp;quot;) --This prints 'I am at (1,2,3)' or whatever your coordinates are&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Vector Example ==&lt;br /&gt;
GPS position and navigation can be handled more easily using a [[vector (API)|vector]].&lt;br /&gt;
&lt;br /&gt;
  local home = vector.new(45, 85, 20)&lt;br /&gt;
  local position = vector.new(gps.locate(5))&lt;br /&gt;
  local displacement = position - home&lt;br /&gt;
  &lt;br /&gt;
  print(&amp;quot;I am &amp;quot;, tostring(displacement), &amp;quot; away from home!!!&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=6940</id>
		<title>Gps (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=6940"/>
				<updated>2015-03-20T04:22:36Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use API table template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GPS API provides a method for turtles and computers to retrieve their own locations.&lt;br /&gt;
&lt;br /&gt;
It broadcasts a PING message over [[Rednet_(API)|rednet]] and wait for responses. In order for this system to work, there must be at least 4 computers used as gps ''hosts'' which will respond and allow [[Wikipedia:Trilateration|trilateration]]. Three of these hosts should be in a plane, and the fourth should be either above or below the other three. The three in a plane should not be in a line with each other. You can set up hosts using the [[Gps (program)|gps program]].&lt;br /&gt;
&lt;br /&gt;
Note:  When entering in the coordinates for the ''host'' you need to put in the x,y,z of the computer, not the modem, as all rednet distances are measured from the block the computer is in. &lt;br /&gt;
&lt;br /&gt;
Also note that you may ''choose'' which axises x, y or z refers to - so long as your systems have the same definition as any GPS servers that're in range, it works just the same. For example, you might build a GPS cluster according to [http://www.computercraft.info/forums2/index.php?/topic/3088-how-to-guide-gps-global-position-system/ this tutorial], using z to account for height, or you might use y to account for height in the way that MineCraft's debug screen displays.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- do not edit this without actually testing it yourself --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{API table|Gps|image=Grid_disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row|gps.locate(&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;{{type|number}} timeout [, {{Type|boolean}} debug]])|({{Type|number}} x, {{Type|number}} y, {{Type|number}} z) or {{Type|nil}}|Tries to retrieve the computer or turtles own location. On success, returns the location of the turtle’s modem. On failure (if no responses are received for &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; seconds, by default 2), returns {{Type|nil}}. If &amp;lt;var&amp;gt;debug&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, debug messages are printed.|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
  print(&amp;quot;Man I am so lost right now!&amp;quot;)&lt;br /&gt;
  local x, y, z = gps.locate(5)&lt;br /&gt;
  if not x then --If gps.locate didn't work, it won't return anything. So check to see if it did.&lt;br /&gt;
    print(&amp;quot;Failed to get my location!&amp;quot;)&lt;br /&gt;
  else&lt;br /&gt;
    print(&amp;quot;I am at (&amp;quot; .. x .. &amp;quot;, &amp;quot; .. y .. &amp;quot;, &amp;quot; .. z .. &amp;quot;)&amp;quot;) --This prints 'I am at (1,2,3)' or whatever your coordinates are&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Vector Example ==&lt;br /&gt;
GPS position and navigation can be handled more easily using a [[vector (API)|vector]].&lt;br /&gt;
&lt;br /&gt;
  local home = vector.new(45, 85, 20)&lt;br /&gt;
  local position = vector.new(gps.locate(5))&lt;br /&gt;
  local displacement = position - home&lt;br /&gt;
  &lt;br /&gt;
  print(&amp;quot;I am &amp;quot;, tostring(displacement), &amp;quot; away from home!!!&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Disk_(API)&amp;diff=6939</id>
		<title>Disk (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Disk_(API)&amp;diff=6939"/>
				<updated>2015-03-20T04:06:10Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed casing of return values&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''If you were looking for the item, please see [[Floppy Disk]].''&lt;br /&gt;
&lt;br /&gt;
The Disk API allows you to interact with disk drives. These functions can operate on locally attached or remote disk drives. To use a locally attached drive, specify “side” as one of the six sides (e.g. “left”); to use a remote disk drive, specify its name as printed when enabling its modem (e.g. “drive_0”).&lt;br /&gt;
&lt;br /&gt;
{{API table|Disk|image=Grid_disk.png|2=&lt;br /&gt;
&lt;br /&gt;
{{API table/row|[[disk.isPresent]]({{type|string}} side)|{{type|boolean}} present|Checks whether any item is in a disk drive.|odd}}&lt;br /&gt;
{{API table/row|[[disk.hasData]]({{type|string}} side)|{{type|boolean}} hasData|Checks whether a [[Floppy Disk]] is in a disk drive.|}}&lt;br /&gt;
{{API table/row|[[disk.getMountPath]]({{type|string}} side)|{{type|string}}/{{type|nil}} path|Gets the directory name where the contents of the floppy disk can be accessed.|odd}}&lt;br /&gt;
{{API table/row|[[disk.setLabel]]({{type|string}} side, {{type|string}} label)|{{type|nil}}|Sets the floppy disk's label.|}}&lt;br /&gt;
{{API table/row|[[disk.getLabel]]({{type|string}} side)|{{type|string}}/{{type|nil}} label|Gets the floppy disk's label.|odd}}&lt;br /&gt;
{{API table/row|[[disk.getID]]({{type|string}} side)|{{type|number}}/{{type|nil}} id|Gets the floppy disk's unique ID number.|}}&lt;br /&gt;
{{API table/row|[[disk.hasAudio]]({{type|string}} side)|{{type|boolean}} hasAudio|Checks whether a [http://www.minecraftwiki.net/wiki/Music_Discs music disk] is in the drive.|odd}}&lt;br /&gt;
{{API table/row|[[disk.getAudioTitle]]({{type|string}} side)|{{type|string}}/{{type|nil}} title|Gets the title of the music disc in the drive.|}}&lt;br /&gt;
{{API table/row|[[disk.playAudio]]({{type|string}} side)|{{type|nil}}|Starts playing the music disc in the drive.|odd}}&lt;br /&gt;
{{API table/row|[[disk.stopAudio]]({{type|string}} side)|{{type|nil}}|Stops playing the music disc in the drive.|}}&lt;br /&gt;
{{API table/row|[[disk.eject]]({{type|string}} side)|{{type|nil}}|Ejects any item currently in the drive, spilling it into the world as a loose item.|odd}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Command_Block_(API)&amp;diff=5670</id>
		<title>Command Block (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Command_Block_(API)&amp;diff=5670"/>
				<updated>2013-05-15T13:51:39Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Updated table to v2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Block API allows you to run commands in a Command Block, using it as a peripheral.&lt;br /&gt;
(The peripheral can only be used if allowed in the config, which is default to false)&lt;br /&gt;
&lt;br /&gt;
Functions exposed by the Command Block, where commandBlock is wrapped to a command block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Command Block (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[commandBlock.getCommand]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a string containing the command currently inside the Command Block.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[commandBlock.setCommand]]({{type|string}} command)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the command in the Command Block to ''command''. '''This does not run it.'''&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[commandBlock.runCommand]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Runs the command inside the Command Block previously set by manually editing it or by using [[commandBlock.setCommand]]()&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
All Command Block functions are to be used ''after'' wrapping the block in a peripheral.&lt;br /&gt;
'''example''':&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
 commandBlock = [[peripheral.wrap]](&amp;quot;left&amp;quot;)&lt;br /&gt;
 commandBlock.setCommand(&amp;quot;time set 1000&amp;quot;)&lt;br /&gt;
 commandBlock.runCommand()&lt;br /&gt;
 local currentCommand = commandBlock.getCommand()&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripheral APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Write&amp;diff=5669</id>
		<title>Write</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Write&amp;diff=5669"/>
				<updated>2013-05-15T13:38:11Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Made it more clear that arg doesn't have to be a string.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=write&lt;br /&gt;
|args= Mixed data&lt;br /&gt;
|api=&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Writes characters to the terminal screen.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Writes Hello World! to the terminal screen.&lt;br /&gt;
|code=write (&amp;quot;Hello &amp;quot;)&lt;br /&gt;
 write (&amp;quot;World!&amp;quot;)&lt;br /&gt;
|output=Hello World! (in one line)&lt;br /&gt;
}}&lt;br /&gt;
|notes=*Starts writing where the last write stopped as opposed to [[print]]() which always prints in a new line.&lt;br /&gt;
*When used at the end of a program, the following prompt will be in the same line.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.setBundledOutput&amp;diff=5599</id>
		<title>Redstone.setBundledOutput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.setBundledOutput&amp;diff=5599"/>
				<updated>2013-05-06T00:11:26Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.setBundledOutput&lt;br /&gt;
|args={{type|string}} side, {{type|int}} colors&lt;br /&gt;
|api=redstone&lt;br /&gt;
|returns=?&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|examples=&lt;br /&gt;
===Basic usage===&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Toggles between the black and white wires every two seconds&lt;br /&gt;
|code=while(true) do&amp;lt;br /&amp;gt;    redstone.setBundledOutput(&amp;quot;back&amp;quot;, colors.black)&amp;lt;br /&amp;gt;    sleep(2)&amp;lt;br /&amp;gt;    redstone.setBundledOutput(&amp;quot;back&amp;quot;, colors.white)&amp;lt;br /&amp;gt;    sleep(2)&amp;lt;br /&amp;gt;end&lt;br /&gt;
|output=(nothing on the screen)&lt;br /&gt;
}}&lt;br /&gt;
===Combining outputs===&lt;br /&gt;
The value is passed as an integer, so sending multiple colors is as easy as adding them together:&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Toggles between the black/white and red/blue wires every two seconds&lt;br /&gt;
|code=while(true) do&amp;lt;br /&amp;gt;    redstone.setBundledOutput(&amp;quot;back&amp;quot;, colors.black+colors.white)&amp;lt;br /&amp;gt;    sleep(2)&amp;lt;br /&amp;gt;    redstone.setBundledOutput(&amp;quot;back&amp;quot;, colors.red+colors.blue)&amp;lt;br /&amp;gt;    sleep(2)&amp;lt;br /&amp;gt;end&lt;br /&gt;
|output=(nothing on the screen)&lt;br /&gt;
}}&lt;br /&gt;
===Clearing the output===&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Unsets the output (removes all power)&lt;br /&gt;
|code=function unsetAll(sSide)&amp;lt;br /&amp;gt;    redstone.setBundledOutput(sSide, 0)&amp;lt;br /&amp;gt;end&lt;br /&gt;
|output=(nothing on the screen)&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.setAnalogOutput&amp;diff=5598</id>
		<title>Redstone.setAnalogOutput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.setAnalogOutput&amp;diff=5598"/>
				<updated>2013-05-06T00:10:29Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Created function page with example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.setAnalogOutput&lt;br /&gt;
|args={{type|string}} side, {{type|int}} strength&lt;br /&gt;
|desc=Sets the strength of redstone output to ''strength'' on ''side''. ''strength'' must be an integer between 0 and 15, 0 being off, and 15 being the strongest.&lt;br /&gt;
|api=redstone&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Makes the computer output a redstone signal at various strengths&lt;br /&gt;
|code=redstone.setAnalogOutput(&amp;quot;back&amp;quot;, 15)&lt;br /&gt;
 sleep(2)&lt;br /&gt;
 redstone.setAnalogOutput(&amp;quot;back&amp;quot;, 10)&lt;br /&gt;
 sleep(2)&lt;br /&gt;
 redstone.setAnalogOutput(&amp;quot;back&amp;quot;, 5)&lt;br /&gt;
 sleep(2)&lt;br /&gt;
 redstone.setAnalogOutput(&amp;quot;back&amp;quot;, 0)&lt;br /&gt;
|output=A block at the back of the computer will receive a strong redstone signal at first, and that signal will slowly diminish.&lt;br /&gt;
}}&lt;br /&gt;
|notes=&lt;br /&gt;
* This function will throw an error if you give it an invalid side.&lt;br /&gt;
* List of possible sides: left, right, front, back, bottom, top&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.setOutput&amp;diff=5597</id>
		<title>Redstone.setOutput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.setOutput&amp;diff=5597"/>
				<updated>2013-05-06T00:03:22Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.setOutput&lt;br /&gt;
|args={{type|string}} side, {{type|boolean}} state&lt;br /&gt;
|api=redstone&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Makes the computer output a redstone signal for one second&lt;br /&gt;
|code=redstone.setOutput(&amp;quot;back&amp;quot;, true)&lt;br /&gt;
 sleep(1)&lt;br /&gt;
 redstone.setOutput(&amp;quot;back&amp;quot;, false)&lt;br /&gt;
|output=Redstone wire connected to the back of the computer will be powered for one second, then unpowered (unless it's powered by another source)&lt;br /&gt;
}}&lt;br /&gt;
|notes=&lt;br /&gt;
* This function will throw an error if you give it an invalid side.&lt;br /&gt;
* List of possible sides: left, right, front, back, bottom, top&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.detectUp&amp;diff=5596</id>
		<title>Turtle.detectUp</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.detectUp&amp;diff=5596"/>
				<updated>2013-05-06T00:01:46Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Corrected sentence casing (don't capitalize non-nouns in the middle of a sentence -_-), grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.detectUp&lt;br /&gt;
|args=&lt;br /&gt;
|api=turtle&lt;br /&gt;
|returns={{type|boolean}} If turtle has detected a block above it.&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Detects if there is a block above the turtle.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Detects if there is a block above the turtle.&lt;br /&gt;
|code=turtle.detectUp()&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.getOutput&amp;diff=5595</id>
		<title>Redstone.getOutput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.getOutput&amp;diff=5595"/>
				<updated>2013-05-05T23:56:28Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Named the return value&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.getOutput&lt;br /&gt;
|args={{type|string}} side&lt;br /&gt;
|returns={{type|boolean}} state&lt;br /&gt;
|api=redstone&lt;br /&gt;
|desc=Returns what was set with [[redstone.setOutput]]().&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Sets the output of the left side to true, then prints the output of the left side.&lt;br /&gt;
|code=redstone.setOutput(&amp;quot;left&amp;quot;, true) -- Set the output on the left to true&lt;br /&gt;
 print(redstone.getOutput(&amp;quot;left&amp;quot;)) --Print the output&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.getOutput&amp;diff=5594</id>
		<title>Redstone.getOutput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.getOutput&amp;diff=5594"/>
				<updated>2013-05-05T23:56:07Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template, does NOT return int, returns boolean, corrected example, cleared up description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.getOutput&lt;br /&gt;
|args={{type|string}} side&lt;br /&gt;
|returns={{type|boolean}} &lt;br /&gt;
|api=redstone&lt;br /&gt;
|desc=Returns what was set with [[redstone.setOutput]]().&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Sets the output of the left side to true, then prints the output of the left side.&lt;br /&gt;
|code=redstone.setOutput(&amp;quot;left&amp;quot;, true) -- Set the output on the left to true&lt;br /&gt;
 print(redstone.getOutput(&amp;quot;left&amp;quot;)) --Print the output&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone_(API)&amp;diff=5593</id>
		<title>Redstone (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone_(API)&amp;diff=5593"/>
				<updated>2013-05-05T23:53:46Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: There is no 'number' type, changed to 'int'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Redstone API contains methods to control attached RedPower cables/bundled cables and regular redstone. All methods from the redstone API can also be called using &amp;quot;rs&amp;quot;, which points to the same library. For example, instead of redstone.getSides(), rs.getSides() can be used. Refer to the [[Colors]] API for more information on interacting with RedPower's bundled cables.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Redstone (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getSides]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a table of possible sides.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getInput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the current redstone input signal state on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.setOutput]]({{type|string}} side, {{type|boolean}} value)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets or resets a redstone signal on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getOutput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the current redstone output signal on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getAnalogInput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the current redstone input signal strength on ''side''. If no input is present, returns 0. If a redstone source (such as a redstone torch or block) is directly adjacent to the computer, returns 15.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.setAnalogOutput]]({{type|string}} side, {{type|int}} strength)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets or resets a redstone signal on ''side'' to ''strength''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getAnalogOutput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the current redstone output signal strength on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getBundledInput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the state (as a number) of a RedPower bundled cable connected to ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.getBundledOutput]]({{type|string}} side)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the set of RedPower wires in the RedPower bundled cable which are being activated by the terminal on ''side''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.setBundledOutput]]({{type|string}} side, {{type|int}} colors)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets one or multiple colored signals in a RedPower bundled cable attached to ''side''. ''colors'' will determine which signals are activated. In order to set multiple signals, add the color values of the colors you want to activate. To turn off all of the colors, use 0.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[redstone.testBundledInput]]({{type|string}} side, {{type|int}} color)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns true if ''color'' is active in a RedPower bundled cable attached to ''side''. Else, returns false.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.getAnalogOutput&amp;diff=5592</id>
		<title>Redstone.getAnalogOutput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.getAnalogOutput&amp;diff=5592"/>
				<updated>2013-05-05T23:53:01Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Created function page with example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.getAnalogOutput&lt;br /&gt;
|args={{type|string}} side&lt;br /&gt;
|returns={{type|int}} strength&lt;br /&gt;
|desc=Returns what was set with [[redstone.setAnalogOutput]]().&lt;br /&gt;
|api=redstone&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Sets the redstone output strength on the left to 7, then prints the output strength of the left side.&lt;br /&gt;
|code=redstone.setAnalogOutput(&amp;quot;left&amp;quot;, 7) -- Set the output strength on the left to 7&lt;br /&gt;
 print(redstone.getOutput(&amp;quot;left&amp;quot;)) -- Print the output strength&lt;br /&gt;
|output=Prints the strength of the redstone output, so in this case, 7.&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Redstone.getAnalogInput&amp;diff=5591</id>
		<title>Redstone.getAnalogInput</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Redstone.getAnalogInput&amp;diff=5591"/>
				<updated>2013-05-05T23:47:58Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Created function page with example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=redstone.getAnalogInput&lt;br /&gt;
|args={{type|string}} side&lt;br /&gt;
|returns={{type|int}} strength&lt;br /&gt;
|desc=Returns the strength of a redstone signal (0-15) on ''side''. If there is no redstone signal on ''side'', returns 0. If there is a redstone source (a redstone block or torch) on ''side'', returns 15.&lt;br /&gt;
|api=redstone&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints the strength of a redstone signal on the left side&lt;br /&gt;
|code=[[print]](&amp;quot;Redstone strength on left: &amp;quot; .. redstone.getAnalogInput(&amp;quot;left&amp;quot;))&lt;br /&gt;
|output=A number from 0-15 representing the redstone strength&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Shell.run&amp;diff=5575</id>
		<title>Shell.run</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Shell.run&amp;diff=5575"/>
				<updated>2013-05-05T01:19:43Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template, italicized args in context&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=shell.run&lt;br /&gt;
|args= {{type|string}} program [, {{type|string}} args]&lt;br /&gt;
|returns={{type|boolean}} success&lt;br /&gt;
|api=shell&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Runs ''program'' with optional specified arguments&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Runs the program &amp;quot;myprogram&amp;quot; with arguments &amp;quot;test&amp;quot; and &amp;quot;ing&amp;quot;&lt;br /&gt;
|code=shell.run(&amp;quot;myprogram&amp;quot;, &amp;quot;test&amp;quot;, &amp;quot;ing&amp;quot;)&lt;br /&gt;
|output=The program myprogram with the arguments &amp;quot;test&amp;quot; and &amp;quot;ing&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5574</id>
		<title>Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5574"/>
				<updated>2013-05-04T20:54:39Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Made it clear that arg is optional&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Turtle API is used to work with your [[Turtle|Turtles]].&lt;br /&gt;
&lt;br /&gt;
===Key===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Color  !! Turtles that can perform this&lt;br /&gt;
|-&lt;br /&gt;
| White  ||All&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|Green   || Crafty&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
| Yellow || Mining, Felling, Digging, Farming&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
| Red    || Any tool&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- ##################&lt;br /&gt;
To add additional colors, visit Template:row-lightgreen, copy the source, do a search for Template:row-yourcolor and hit Create Page. ################## --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;100px&amp;quot; | Return&lt;br /&gt;
! width=&amp;quot;200px&amp;quot; | Method name&lt;br /&gt;
! Description&lt;br /&gt;
! Min version&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.craft]]({{type|int}} quantity)&lt;br /&gt;
|Craft items using ingredients anywhere in the turtle's inventory and place results in the active slot. If a quantity is specified, it will craft only up to that many items, otherwise, it will craft as many of the items as possible.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.forward]]()&lt;br /&gt;
|Try to move the turtle forward&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.back]]()&lt;br /&gt;
|Try to move the turtle backward&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.up]]()&lt;br /&gt;
|Try to move the turtle up&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.down]]()&lt;br /&gt;
|Try to move the turtle down &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnLeft]]()&lt;br /&gt;
|Turn the turtle left&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnRight]]()&lt;br /&gt;
|Turn the turtle right&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.select]]({{type|int}} slotNum)&lt;br /&gt;
|Make the turtle select slot ''slotNum'' (1 is top left, 16 (9 in 1.33 and earlier) is bottom right)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} count&lt;br /&gt;
|[[turtle.getItemCount]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many items are in slot ''slotNum''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} count&lt;br /&gt;
|[[turtle.getItemSpace]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many remaining items you need to fill the stack in slot ''slotNum''&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attack]]()&lt;br /&gt;
|Attacks in front of the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success &lt;br /&gt;
|[[turtle.attackUp]]()&lt;br /&gt;
|Attacks above the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attackDown]]()&lt;br /&gt;
|Attacks under the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.dig]]()&lt;br /&gt;
|Breaks the block in front. With hoe: tills the dirt in front of it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digUp]]()&lt;br /&gt;
|Breaks the block above. With hoe: tills the dirt above it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digDown]]()&lt;br /&gt;
|Breaks the block below. With hoe: tills the dirt below it.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.place]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|string}} signText])&lt;br /&gt;
|Places a block of the selected slot in front. Engrave ''signText'' on signs if provided.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeUp]]()&lt;br /&gt;
|Places a block of the selected slot above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeDown]]()&lt;br /&gt;
|Places a block of the selected slot below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detect]]()&lt;br /&gt;
|Detects if there is a block in front.  Does not detect mobs.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectUp]]()&lt;br /&gt;
|Detects if there is a block above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectDown]]()&lt;br /&gt;
|Detects if there is a block below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compare]]()&lt;br /&gt;
|Detects if the block in front is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareUp]]()&lt;br /&gt;
|Detects if the block above is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareDown]]()&lt;br /&gt;
|Detects if the block below is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareTo]]({{type|int}} slot)&lt;br /&gt;
|Compare the current selected slot and the given slot to see if the items are the same. Returns true if they are the same, false if not.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e in front of the turtle) it will try to place into the inventory, returning false if the inventory is full.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropUp]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e above the turtle) it will try to place into the inventory, returning false if the inventory is full. If below a furnace, will place item in the bottom slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropDown]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e below the turtle) it will try to place into the inventory, returning false if the inventory is full. If above a furnace, will place item in the top slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory in front of the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckUp]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory above the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckDown]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory below the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.refuel]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} quantity])&lt;br /&gt;
|If the current selected slot contains a fuel item, it will consume it to give the turtle the ability to move.&amp;lt;br /&amp;gt;Added in 1.4 and is only needed in needfuel mode. If the current slot doesn't contain a fuel item, it returns false. Fuel values for different items can be found at [[Turtle.refuel#Fuel_Values]]. If a quantity is specified, it will refuel only up to that many items, otherwise, it will consume all the items in the slot.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} fuel&lt;br /&gt;
|[[turtle.getFuelLevel]]()&lt;br /&gt;
|Returns the current fuel level of the turtle, this is the number of blocks the turtle can move.&amp;lt;br /&amp;gt;If turtleNeedFuel = 0 then it returns &amp;quot;unlimited&amp;quot;.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.transferTo]]({{type|int}} slot [, {{type|int}} quantity])&lt;br /&gt;
|Transfers ''quantity'' items from the selected slot to ''slot''. If ''quantity'' isn't specified, will attempt to transfer everything in the selected slot to ''slot''.&lt;br /&gt;
| 1.45&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Trivia:&lt;br /&gt;
During the 1.4 beta, turtle.getFuelLevel() in softcore(that is now turtleneedsfuel = 0) returned 9000.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5573</id>
		<title>Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5573"/>
				<updated>2013-05-04T20:50:36Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Clear up descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Turtle API is used to work with your [[Turtle|Turtles]].&lt;br /&gt;
&lt;br /&gt;
===Key===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Color  !! Turtles that can perform this&lt;br /&gt;
|-&lt;br /&gt;
| White  ||All&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|Green   || Crafty&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
| Yellow || Mining, Felling, Digging, Farming&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
| Red    || Any tool&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- ##################&lt;br /&gt;
To add additional colors, visit Template:row-lightgreen, copy the source, do a search for Template:row-yourcolor and hit Create Page. ################## --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;100px&amp;quot; | Return&lt;br /&gt;
! width=&amp;quot;200px&amp;quot; | Method name&lt;br /&gt;
! Description&lt;br /&gt;
! Min version&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.craft]]({{type|int}} quantity)&lt;br /&gt;
|Craft items using ingredients anywhere in the turtle's inventory and place results in the active slot. If a quantity is specified, it will craft only up to that many items, otherwise, it will craft as many of the items as possible.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.forward]]()&lt;br /&gt;
|Try to move the turtle forward&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.back]]()&lt;br /&gt;
|Try to move the turtle backward&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.up]]()&lt;br /&gt;
|Try to move the turtle up&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.down]]()&lt;br /&gt;
|Try to move the turtle down &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnLeft]]()&lt;br /&gt;
|Turn the turtle left&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnRight]]()&lt;br /&gt;
|Turn the turtle right&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.select]]({{type|int}} slotNum)&lt;br /&gt;
|Make the turtle select slot ''slotNum'' (1 is top left, 16 (9 in 1.33 and earlier) is bottom right)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} count&lt;br /&gt;
|[[turtle.getItemCount]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many items are in slot ''slotNum''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} count&lt;br /&gt;
|[[turtle.getItemSpace]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many remaining items you need to fill the stack in slot ''slotNum''&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attack]]()&lt;br /&gt;
|Attacks in front of the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success &lt;br /&gt;
|[[turtle.attackUp]]()&lt;br /&gt;
|Attacks above the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attackDown]]()&lt;br /&gt;
|Attacks under the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.dig]]()&lt;br /&gt;
|Breaks the block in front. With hoe: tills the dirt in front of it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digUp]]()&lt;br /&gt;
|Breaks the block above. With hoe: tills the dirt above it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digDown]]()&lt;br /&gt;
|Breaks the block below. With hoe: tills the dirt below it.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.place]]({{type|string}} signText)&lt;br /&gt;
|Places a block of the selected slot in front. Engrave ''signText'' on signs if provided.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeUp]]()&lt;br /&gt;
|Places a block of the selected slot above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeDown]]()&lt;br /&gt;
|Places a block of the selected slot below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detect]]()&lt;br /&gt;
|Detects if there is a block in front.  Does not detect mobs.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectUp]]()&lt;br /&gt;
|Detects if there is a block above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectDown]]()&lt;br /&gt;
|Detects if there is a block below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compare]]()&lt;br /&gt;
|Detects if the block in front is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareUp]]()&lt;br /&gt;
|Detects if the block above is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareDown]]()&lt;br /&gt;
|Detects if the block below is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareTo]]({{type|int}} slot)&lt;br /&gt;
|Compare the current selected slot and the given slot to see if the items are the same. Returns true if they are the same, false if not.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e in front of the turtle) it will try to place into the inventory, returning false if the inventory is full.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropUp]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e above the turtle) it will try to place into the inventory, returning false if the inventory is full. If below a furnace, will place item in the bottom slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropDown]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e below the turtle) it will try to place into the inventory, returning false if the inventory is full. If above a furnace, will place item in the top slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory in front of the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckUp]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory above the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckDown]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory below the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.refuel]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} quantity])&lt;br /&gt;
|If the current selected slot contains a fuel item, it will consume it to give the turtle the ability to move.&amp;lt;br /&amp;gt;Added in 1.4 and is only needed in needfuel mode. If the current slot doesn't contain a fuel item, it returns false. Fuel values for different items can be found at [[Turtle.refuel#Fuel_Values]]. If a quantity is specified, it will refuel only up to that many items, otherwise, it will consume all the items in the slot.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} fuel&lt;br /&gt;
|[[turtle.getFuelLevel]]()&lt;br /&gt;
|Returns the current fuel level of the turtle, this is the number of blocks the turtle can move.&amp;lt;br /&amp;gt;If turtleNeedFuel = 0 then it returns &amp;quot;unlimited&amp;quot;.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.transferTo]]({{type|int}} slot [, {{type|int}} quantity])&lt;br /&gt;
|Transfers ''quantity'' items from the selected slot to ''slot''. If ''quantity'' isn't specified, will attempt to transfer everything in the selected slot to ''slot''.&lt;br /&gt;
| 1.45&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Trivia:&lt;br /&gt;
During the 1.4 beta, turtle.getFuelLevel() in softcore(that is now turtleneedsfuel = 0) returned 9000.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5572</id>
		<title>Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5572"/>
				<updated>2013-05-04T20:48:50Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Correcter case (&amp;quot;Block&amp;quot; -&amp;gt; &amp;quot;block&amp;quot;, &amp;quot;Turtle&amp;quot; -&amp;gt; &amp;quot;turtle&amp;quot;), changed descriptions to reference args, italicized args in context&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Turtle API is used to work with your [[Turtle|Turtles]].&lt;br /&gt;
&lt;br /&gt;
===Key===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Color  !! Turtles that can perform this&lt;br /&gt;
|-&lt;br /&gt;
| White  ||All&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|Green   || Crafty&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
| Yellow || Mining, Felling, Digging, Farming&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
| Red    || Any tool&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- ##################&lt;br /&gt;
To add additional colors, visit Template:row-lightgreen, copy the source, do a search for Template:row-yourcolor and hit Create Page. ################## --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;100px&amp;quot; | Return&lt;br /&gt;
! width=&amp;quot;200px&amp;quot; | Method name&lt;br /&gt;
! Description&lt;br /&gt;
! Min version&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.craft]]({{type|int}} quantity)&lt;br /&gt;
|Craft items using ingredients anywhere in the turtle's inventory and place results in the active slot. If a quantity is specified, it will craft only up to that many items, otherwise, it will craft as many of the items as possible.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.forward]]()&lt;br /&gt;
|Let the turtle move forward&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.back]]()&lt;br /&gt;
|Let the turtle move back&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.up]]()&lt;br /&gt;
|Let the Turtle move up&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.down]]()&lt;br /&gt;
|Let the turtle move down &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnLeft]]()&lt;br /&gt;
|Let the turtle turn left&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnRight]]()&lt;br /&gt;
|Let the turtle turn right&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.select]]({{type|int}} slotNum)&lt;br /&gt;
|The turtle selects slot ''slotNum'' (1 is top left, 16 (9 in 1.33 and earlier) is bottom right)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} items&lt;br /&gt;
|[[turtle.getItemCount]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many items are in slot ''slotNum''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} items&lt;br /&gt;
|[[turtle.getItemSpace]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many remaining items you need to fill the stack in slot ''slotNum''&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attack]]()&lt;br /&gt;
|Attacks in front of the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success &lt;br /&gt;
|[[turtle.attackUp]]()&lt;br /&gt;
|Attacks above the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attackDown]]()&lt;br /&gt;
|Attacks under the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.dig]]()&lt;br /&gt;
|Breaks the block in front. With hoe: tills the dirt in front of it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digUp]]()&lt;br /&gt;
|Breaks the block above. With hoe: tills the dirt above it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digDown]]()&lt;br /&gt;
|Breaks the block below. With hoe: tills the dirt below it.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.place]]({{type|string}} signText)&lt;br /&gt;
|Places a block of the selected slot in front. Engrave ''signText'' on signs if provided.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeUp]]()&lt;br /&gt;
|Places a block of the selected slot above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeDown]]()&lt;br /&gt;
|Places a block of the selected slot below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detect]]()&lt;br /&gt;
|Detects if there is a block in front.  Does not detect mobs.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectUp]]()&lt;br /&gt;
|Detects if there is a block above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectDown]]()&lt;br /&gt;
|Detects if there is a block below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compare]]()&lt;br /&gt;
|Detects if the block in front is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareUp]]()&lt;br /&gt;
|Detects if the block above is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareDown]]()&lt;br /&gt;
|Detects if the block below is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareTo]]({{type|int}} slot)&lt;br /&gt;
|Compare the current selected slot and the given slot to see if the items are the same. Returns true if they are the same, false if not.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e in front of the turtle) it will try to place into the inventory, returning false if the inventory is full.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropUp]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e above the turtle) it will try to place into the inventory, returning false if the inventory is full. If below a furnace, will place item in the bottom slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropDown]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e below the turtle) it will try to place into the inventory, returning false if the inventory is full. If above a furnace, will place item in the top slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory in front of the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckUp]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory above the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckDown]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory below the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.refuel]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} quantity])&lt;br /&gt;
|If the current selected slot contains a fuel item, it will consume it to give the turtle the ability to move.&amp;lt;br /&amp;gt;Added in 1.4 and is only needed in needfuel mode. If the current slot doesn't contain a fuel item, it returns false. Fuel values for different items can be found at [[Turtle.refuel#Fuel_Values]]. If a quantity is specified, it will refuel only up to that many items, otherwise, it will consume all the items in the slot.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} fuel&lt;br /&gt;
|[[turtle.getFuelLevel]]()&lt;br /&gt;
|Returns the current fuel level of the turtle, this is the number of blocks the turtle can move.&amp;lt;br /&amp;gt;If turtleNeedFuel = 0 then it returns &amp;quot;unlimited&amp;quot;.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.transferTo]]({{type|int}} slot [, {{type|int}} quantity])&lt;br /&gt;
|Transfers ''quantity'' items from the selected slot to ''slot''. If ''quantity'' isn't specified, will attempt to transfer everything in the selected slot to ''slot''.&lt;br /&gt;
| 1.45&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Trivia:&lt;br /&gt;
During the 1.4 beta, turtle.getFuelLevel() in softcore(that is now turtleneedsfuel = 0) returned 9000.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5571</id>
		<title>Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5571"/>
				<updated>2013-05-04T20:45:11Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Made it clear that arg is optional, cleared up descriptions for turtle.drop(), .dropUp(), .dropDown()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Turtle API is used to work with your [[Turtle|Turtles]].&lt;br /&gt;
&lt;br /&gt;
===Key===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Color  !! Turtles that can perform this&lt;br /&gt;
|-&lt;br /&gt;
| White  ||All&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|Green   || Crafty&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
| Yellow || Mining, Felling, Digging, Farming&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
| Red    || Any tool&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- ##################&lt;br /&gt;
To add additional colors, visit Template:row-lightgreen, copy the source, do a search for Template:row-yourcolor and hit Create Page. ################## --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;100px&amp;quot; | Return&lt;br /&gt;
! width=&amp;quot;200px&amp;quot; | Method name&lt;br /&gt;
! Description&lt;br /&gt;
! Min version&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.craft]]({{type|int}} quantity)&lt;br /&gt;
|Craft items using ingredients anywhere in the Turtle's inventory and place results in the active slot. If a quantity is specified, it will craft only up to that many items, otherwise, it will craft as many of the items as possible.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.forward]]()&lt;br /&gt;
|Let the Turtle move forward&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.back]]()&lt;br /&gt;
|Let the Turtle move back&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.up]]()&lt;br /&gt;
|Let the Turtle move up&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.down]]()&lt;br /&gt;
|Let the Turtle move down &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnLeft]]()&lt;br /&gt;
|Let the Turtle turn left&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnRight]]()&lt;br /&gt;
|Let the Turtle turn right&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.select]]({{type|int}} slotNum)&lt;br /&gt;
|The Turtle selects the given Slot (1 is top left, 16 (9 in 1.33 and earlier) is bottom right)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} items&lt;br /&gt;
|[[turtle.getItemCount]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many items are in the given Slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} items&lt;br /&gt;
|[[turtle.getItemSpace]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many remaining items you need to fill the stack in the given Slot&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attack]]()&lt;br /&gt;
|Attacks in front of the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success &lt;br /&gt;
|[[turtle.attackUp]]()&lt;br /&gt;
|Attacks over the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attackDown]]()&lt;br /&gt;
|Attacks under the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.dig]]()&lt;br /&gt;
|Breaks the Block in front. With hoe: tills the dirt in front of it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digUp]]()&lt;br /&gt;
|Breaks the Block above. With hoe: tills the dirt above it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digDown]]()&lt;br /&gt;
|Breaks the Block below. With hoe: tills the dirt below it.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.place]]({{type|string}} signText)&lt;br /&gt;
|Places a Block of the selected slot in front. Engrave ''signText'' on signs if provided.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeUp]]()&lt;br /&gt;
|Places a Block of the selected slot above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeDown]]()&lt;br /&gt;
|Places a Block of the selected slot below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detect]]()&lt;br /&gt;
|Detects if there is a Block in front.  Does not detect mobs.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectUp]]()&lt;br /&gt;
|Detects if there is a Block above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectDown]]()&lt;br /&gt;
|Detects if there is a Block below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compare]]()&lt;br /&gt;
|Detects if the block in front is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareUp]]()&lt;br /&gt;
|Detects if the block above is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareDown]]()&lt;br /&gt;
|Detects if the block below is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareTo]]({{type|int}} slot)&lt;br /&gt;
|Compare the current selected slot and the given slot to see if the items are the same. Returns true if they are the same, false if not.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e in front of the turtle) it will try to place into the inventory, returning false if the inventory is full.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropUp]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e above the turtle) it will try to place into the inventory, returning false if the inventory is full. If below a furnace, will place item in the bottom slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropDown]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count])&lt;br /&gt;
|Drops all items in the selected slot, or specified, drops ''count'' items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e below the turtle) it will try to place into the inventory, returning false if the inventory is full. If above a furnace, will place item in the top slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory in front of the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckUp]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory above the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckDown]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory below the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.refuel]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} quantity])&lt;br /&gt;
|If the current selected slot contains a fuel item, it will consume it to give the turtle the ability to move.&amp;lt;br /&amp;gt;Added in 1.4 and is only needed in needfuel mode. If the current slot doesn't contain a fuel item, it returns false. Fuel values for different items can be found at [[Turtle.refuel#Fuel_Values]]. If a quantity is specified, it will refuel only up to that many items, otherwise, it will consume all the items in the slot.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} fuel&lt;br /&gt;
|[[turtle.getFuelLevel]]()&lt;br /&gt;
|Returns the current fuel level of the turtle, this is the number of blocks the turtle can move.&amp;lt;br /&amp;gt;If turtleNeedFuel = 0 then it returns &amp;quot;unlimited&amp;quot;.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.transferTo]]({{type|int}} slot [, {{type|int}} quantity])&lt;br /&gt;
|Transfers ''quantity'' items from the selected slot to ''slot''. If ''quantity'' isn't specified, will attempt to transfer everything in the selected slot to ''slot''.&lt;br /&gt;
| 1.45&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Trivia:&lt;br /&gt;
During the 1.4 beta, turtle.getFuelLevel() in softcore(that is now turtleneedsfuel = 0) returned 9000.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.drop&amp;diff=5570</id>
		<title>Turtle.drop</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.drop&amp;diff=5570"/>
				<updated>2013-05-04T20:31:48Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Made it clear that arg is optional, added types, italicized args in context&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.drop&lt;br /&gt;
|args=[&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} count]&lt;br /&gt;
|returns={{type|boolean}} true if an item was dropped; false otherwise.&lt;br /&gt;
|api=turtle&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Drops all items in the selected slot, or if ''count'' is specified, drops that many items.&lt;br /&gt;
If the space in front of the turtle does not contain a chest, the items are dropped into that space.&lt;br /&gt;
If the space in front of the turtle contains a chest, the items are dropped into that chest.&lt;br /&gt;
The items will be placed in the first available slot, starting at the top left, moving right and then down.&lt;br /&gt;
&lt;br /&gt;
turtle.dropUp and turtle.dropDown are also available, and useful for loading furnaces; dropUp when below a furnace will load the items as fuel in the furnace's bottom slot, while dropDown when above the furnace will load the top slot for smelting.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Drops all items in the first available slot.&lt;br /&gt;
|code=turtle.drop()&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5569</id>
		<title>Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5569"/>
				<updated>2013-05-04T20:28:25Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Made it clear that arg is optional, added typles, &amp;quot;yields&amp;quot; -&amp;gt; &amp;quot;returns&amp;quot;, changed description for turtle.transferTo()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Turtle API is used to work with your [[Turtle|Turtles]].&lt;br /&gt;
&lt;br /&gt;
===Key===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Color  !! Turtles that can perform this&lt;br /&gt;
|-&lt;br /&gt;
| White  ||All&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|Green   || Crafty&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
| Yellow || Mining, Felling, Digging, Farming&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
| Red    || Any tool&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- ##################&lt;br /&gt;
To add additional colors, visit Template:row-lightgreen, copy the source, do a search for Template:row-yourcolor and hit Create Page. ################## --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;100px&amp;quot; | Return&lt;br /&gt;
! width=&amp;quot;200px&amp;quot; | Method name&lt;br /&gt;
! Description&lt;br /&gt;
! Min version&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.craft]]({{type|int}} quantity)&lt;br /&gt;
|Craft items using ingredients anywhere in the Turtle's inventory and place results in the active slot. If a quantity is specified, it will craft only up to that many items, otherwise, it will craft as many of the items as possible.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.forward]]()&lt;br /&gt;
|Let the Turtle move forward&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.back]]()&lt;br /&gt;
|Let the Turtle move back&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.up]]()&lt;br /&gt;
|Let the Turtle move up&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.down]]()&lt;br /&gt;
|Let the Turtle move down &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnLeft]]()&lt;br /&gt;
|Let the Turtle turn left&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnRight]]()&lt;br /&gt;
|Let the Turtle turn right&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.select]]({{type|int}} slotNum)&lt;br /&gt;
|The Turtle selects the given Slot (1 is top left, 16 (9 in 1.33 and earlier) is bottom right)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} items&lt;br /&gt;
|[[turtle.getItemCount]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many items are in the given Slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} items&lt;br /&gt;
|[[turtle.getItemSpace]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many remaining items you need to fill the stack in the given Slot&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attack]]()&lt;br /&gt;
|Attacks in front of the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success &lt;br /&gt;
|[[turtle.attackUp]]()&lt;br /&gt;
|Attacks over the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attackDown]]()&lt;br /&gt;
|Attacks under the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.dig]]()&lt;br /&gt;
|Breaks the Block in front. With hoe: tills the dirt in front of it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digUp]]()&lt;br /&gt;
|Breaks the Block above. With hoe: tills the dirt above it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digDown]]()&lt;br /&gt;
|Breaks the Block below. With hoe: tills the dirt below it.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.place]]({{type|string}} signText)&lt;br /&gt;
|Places a Block of the selected slot in front. Engrave ''signText'' on signs if provided.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeUp]]()&lt;br /&gt;
|Places a Block of the selected slot above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeDown]]()&lt;br /&gt;
|Places a Block of the selected slot below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detect]]()&lt;br /&gt;
|Detects if there is a Block in front.  Does not detect mobs.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectUp]]()&lt;br /&gt;
|Detects if there is a Block above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectDown]]()&lt;br /&gt;
|Detects if there is a Block below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compare]]()&lt;br /&gt;
|Detects if the block in front is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareUp]]()&lt;br /&gt;
|Detects if the block above is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareDown]]()&lt;br /&gt;
|Detects if the block below is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareTo]]({{type|int}} slot)&lt;br /&gt;
|Compare the current selected slot and the given slot to see if the items are the same. Returns true if they are the same, false if not.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop]]({{type|int}} count)&lt;br /&gt;
|Drops all items in the selected slot, or if count is specified, drops that many items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e in front of the turtle) it will try to place into the inventory, returning false if the inventory is full.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropUp]]({{type|int}} count)&lt;br /&gt;
|Drops all items in the selected slot, or if count is specified, drops that many items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e above the turtle) it will try to place into the inventory, returning false if the inventory is full. If below a furnace, will place item in the bottom slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropDown]]({{type|int}} count)&lt;br /&gt;
|Drops all items in the selected slot, or if count is specified, drops that many items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e below the turtle) it will try to place into the inventory, returning false if the inventory is full. If above a furnace, will place item in the top slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory in front of the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckUp]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory above the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckDown]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory below the turtle. If the turtle can't pick up the item, the function returns false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.refuel]]([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{type|int}} quantity])&lt;br /&gt;
|If the current selected slot contains a fuel item, it will consume it to give the turtle the ability to move.&amp;lt;br /&amp;gt;Added in 1.4 and is only needed in needfuel mode. If the current slot doesn't contain a fuel item, it returns false. Fuel values for different items can be found at [[Turtle.refuel#Fuel_Values]]. If a quantity is specified, it will refuel only up to that many items, otherwise, it will consume all the items in the slot.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} fuel&lt;br /&gt;
|[[turtle.getFuelLevel]]()&lt;br /&gt;
|Returns the current fuel level of the turtle, this is the number of blocks the turtle can move.&amp;lt;br /&amp;gt;If turtleNeedFuel = 0 then it returns &amp;quot;unlimited&amp;quot;.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.transferTo]]({{type|int}} slot [, {{type|int}} quantity])&lt;br /&gt;
|Transfers ''quantity'' items from the selected slot to ''slot''. If ''quantity'' isn't specified, will attempt to transfer everything in the selected slot to ''slot''.&lt;br /&gt;
| 1.45&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Trivia:&lt;br /&gt;
During the 1.4 beta, turtle.getFuelLevel() in softcore(that is now turtleneedsfuel = 0) returned 9000.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.transferTo&amp;diff=5568</id>
		<title>Turtle.transferTo</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.transferTo&amp;diff=5568"/>
				<updated>2013-05-04T20:23:42Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Made it clear that arg is optional, converted to type templates, corrected grammar, italicized arguments in context&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.transferTo&lt;br /&gt;
|args={{type|int}} slot [, {{type|int}} quantity]&lt;br /&gt;
|returns={{type|boolean}} success&lt;br /&gt;
|api=turtle&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Transfers ''quantity'' items from the selected slot to ''slot''.  If the ''quantity'' argument is omitted, tries to transfer all the items from the selected slot.  If the destination slot already has items of a different type, returns false (does not try to fill the next slot, like suck() would).  If there are fewer than ''quantity'' items in the selected slot or only room for fewer items in the destination slot, transfers as many as possible and returns true.  If none can be transferred, returns false.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Transfers 32 items from the selected slot to slot 6.&lt;br /&gt;
|code=turtle.transferTo(6, 32)&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
This function became available in version 1.45&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5567</id>
		<title>Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_(API)&amp;diff=5567"/>
				<updated>2013-05-04T20:17:44Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Added types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Turtle API is used to work with your [[Turtle|Turtles]].&lt;br /&gt;
&lt;br /&gt;
===Key===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Color  !! Turtles that can perform this&lt;br /&gt;
|-&lt;br /&gt;
| White  ||All&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|Green   || Crafty&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
| Yellow || Mining, Felling, Digging, Farming&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
| Red    || Any tool&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- ##################&lt;br /&gt;
To add additional colors, visit Template:row-lightgreen, copy the source, do a search for Template:row-yourcolor and hit Create Page. ################## --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;100px&amp;quot; | Return&lt;br /&gt;
! width=&amp;quot;200px&amp;quot; | Method name&lt;br /&gt;
! Description&lt;br /&gt;
! Min version&lt;br /&gt;
|-{{row-lightgreen}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.craft]]({{type|int}} quantity)&lt;br /&gt;
|Craft items using ingredients anywhere in the Turtle's inventory and place results in the active slot. If a quantity is specified, it will craft only up to that many items, otherwise, it will craft as many of the items as possible.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.forward]]()&lt;br /&gt;
|Let the Turtle move forward&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.back]]()&lt;br /&gt;
|Let the Turtle move back&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.up]]()&lt;br /&gt;
|Let the Turtle move up&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.down]]()&lt;br /&gt;
|Let the Turtle move down &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnLeft]]()&lt;br /&gt;
|Let the Turtle turn left&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.turnRight]]()&lt;br /&gt;
|Let the Turtle turn right&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.select]]({{type|int}} slotNum)&lt;br /&gt;
|The Turtle selects the given Slot (1 is top left, 16 (9 in 1.33 and earlier) is bottom right)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} result&lt;br /&gt;
|[[turtle.getItemCount]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many items are in the given Slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} result&lt;br /&gt;
|[[turtle.getItemSpace]]({{type|int}} slotNum)&lt;br /&gt;
|Counts how many remaining items you need to fill the stack in the given Slot&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attack]]()&lt;br /&gt;
|Attacks in front of the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success &lt;br /&gt;
|[[turtle.attackUp]]()&lt;br /&gt;
|Attacks over the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightred}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.attackDown]]()&lt;br /&gt;
|Attacks under the turtle.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.dig]]()&lt;br /&gt;
|Breaks the Block in front. With hoe: tills the dirt in front of it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digUp]]()&lt;br /&gt;
|Breaks the Block above. With hoe: tills the dirt above it.&lt;br /&gt;
|&lt;br /&gt;
|-{{row-lightyellow}}&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.digDown]]()&lt;br /&gt;
|Breaks the Block below. With hoe: tills the dirt below it.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.place]]({{type|string}} signText)&lt;br /&gt;
|Places a Block of the selected slot in front. Engrave signText on signs if provided.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeUp]]()&lt;br /&gt;
|Places a Block of the selected slot above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.placeDown]]()&lt;br /&gt;
|Places a Block of the selected slot below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detect]]()&lt;br /&gt;
|Detects if there is a Block in front.  Does not detect mobs.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectUp]]()&lt;br /&gt;
|Detects if there is a Block above&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.detectDown]]()&lt;br /&gt;
|Detects if there is a Block below&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compare]]()&lt;br /&gt;
|Detects if the block in front is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareUp]]()&lt;br /&gt;
|Detects if the block above is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareDown]]()&lt;br /&gt;
|Detects if the block below is the same as the one in the currently selected slot&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} result&lt;br /&gt;
|[[turtle.compareTo]]({{type|int}} slot)&lt;br /&gt;
|Compare the current selected slot and the given slot to see if the items are the same, yields true if they are the same, and false if not.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop]]({{type|int}} count)&lt;br /&gt;
|Drops all items in the selected slot, or if count is specified, drops that many items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e in front of the turtle) it will try to place into the inventory, returning false if the inventory is full.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropUp]]({{type|int}} count)&lt;br /&gt;
|Drops all items in the selected slot, or if count is specified, drops that many items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e above the turtle) it will try to place into the inventory, returning false if the inventory is full. If below a furnace, will place item in the bottom slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.drop|turtle.dropDown]]({{type|int}} count)&lt;br /&gt;
|Drops all items in the selected slot, or if count is specified, drops that many items.&amp;lt;br /&amp;gt;[&amp;gt;= 1.4 only:] If there is a inventory on the side (i.e below the turtle) it will try to place into the inventory, returning false if the inventory is full. If above a furnace, will place item in the top slot.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory in front of the turtle. If the turtle can't pick up the item, the function yields false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckUp]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory above the turtle. If the turtle can't pick up the item, the function yields false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.suck|turtle.suckDown]]()&lt;br /&gt;
|Picks up an item stack of any number, from the ground or an inventory below the turtle. If the turtle can't pick up the item, the function yields false.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.refuel]]({{type|int}} quantity)&lt;br /&gt;
|If the current selected slot contains a fuel item, it will consume it to give the turtle the ability to move.&amp;lt;br /&amp;gt;Added in 1.4  and is only needed in needfuel mode. If the current slot doesn't contain a fuel item, it yields false. Fuel values for different items can be found at [[Turtle.refuel#Fuel_Values]]. If a quantity is specified, it will refuel only up to that many items, otherwise, it will consume all the items in the slot.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|int}} fuel&lt;br /&gt;
|[[turtle.getFuelLevel]]()&lt;br /&gt;
|Returns the current fuel level of the turtle, this is the number of blocks the turtle can move.&amp;lt;br /&amp;gt;If turtleNeedFuel = 0 then it yields &amp;quot;unlimited&amp;quot;.&lt;br /&gt;
| 1.4&lt;br /&gt;
|-&lt;br /&gt;
|{{type|boolean}} success&lt;br /&gt;
|[[turtle.transferTo]]({{type|int}} slot, {{type|int}} quantity)&lt;br /&gt;
|Transfers items from the selected slot to the specified slot in the [quantity] inputted.&lt;br /&gt;
| 1.45&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Trivia:&lt;br /&gt;
During the 1.4 beta, turtle.getFuelLevel() in softcore(that is now turtleneedsfuel = 0) returned 9000.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.detectDown&amp;diff=5566</id>
		<title>Turtle.detectDown</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.detectDown&amp;diff=5566"/>
				<updated>2013-05-04T20:15:56Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Corrected sentence casing (don't capitalize non-nouns in the middle of a sentence -_-)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.detectDown&lt;br /&gt;
|args=&lt;br /&gt;
|api=turtle&lt;br /&gt;
|returns={{type|boolean}} If turtle has detected a block below.&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Detects if there is a Block Below.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Displays whether or not there is a block under the turtle.&lt;br /&gt;
|code=if turtle.detectDown() then&lt;br /&gt;
   print(&amp;quot;There is a block under me!&amp;quot;)&lt;br /&gt;
 else&lt;br /&gt;
   print(&amp;quot;There isn't a block under me!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
|output=A message on the turtle screen telling if a block is under the turtle.&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.detectDown&amp;diff=5565</id>
		<title>Turtle.detectDown</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.detectDown&amp;diff=5565"/>
				<updated>2013-05-04T20:14:49Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Expanded the existing example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.detectDown&lt;br /&gt;
|args=&lt;br /&gt;
|api=turtle&lt;br /&gt;
|returns={{type|boolean}} If turtle has Detected a Block Below.&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Detects if there is a Block Below.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Displays whether or not there is a block under the turtle.&lt;br /&gt;
|code=if turtle.detectDown() then&lt;br /&gt;
   print(&amp;quot;There is a block under me!&amp;quot;)&lt;br /&gt;
 else&lt;br /&gt;
   print(&amp;quot;There isn't a block under me!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
|output=A message on the turtle screen telling if a block is under the turtle.&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Printer.getPageSize&amp;diff=5555</id>
		<title>Printer.getPageSize</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Printer.getPageSize&amp;diff=5555"/>
				<updated>2013-05-03T16:06:42Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed parent api&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=printer.getPageSize&lt;br /&gt;
|returns=Width and Height of the Page in the Printer&lt;br /&gt;
|api=printer&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Returns the size of the page.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Prints the size of a page.&lt;br /&gt;
|code=local x, y = printer.getPageSize()&amp;lt;br/&amp;gt;print(x ..&amp;quot;, &amp;quot;.. y)&lt;br /&gt;
|output=&amp;lt;width&amp;gt;, &amp;lt;height&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Printer_(API)&amp;diff=5554</id>
		<title>Printer (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Printer_(API)&amp;diff=5554"/>
				<updated>2013-05-03T16:06:14Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Add Method Name and Description row to table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Printer API allows you to interact with printers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Printer (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getPaperLevel]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the amount of paper available in the paper tray.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.newPage]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Starts a new page. Returns true if page got started, false if not.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.endPage]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.write]]([[string]] text)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Writes text to the paper, works the same way as [[term.write|term.write()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.setPageTitle]]([[string]] title)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the title of the page.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getInkLevel]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the amount of ink in the ink slot.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getCursorPos]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the coordinates of the cursor on the paper, works the same way as [[term.getCursorPos|term.getCursorPos()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.setCursorPos]]([[int (type)|int]] x, [[int (type)|int]] y)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the cursor pos, works the same way as [[term.setCursorPos|term.setCursorPos()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getPageSize]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the size of the paper, works the same way as [[term.getSize|term.getSize()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
All printer functions are to be used ''after'' wrapping the printer in a peripheral.&lt;br /&gt;
'''example''': printer = peripheral.wrap(&amp;quot;left&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripheral APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=5550</id>
		<title>Printer</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=5550"/>
				<updated>2013-05-03T14:31:45Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Add Method Name and Description row to table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedsWork|Printer methods are not documented on this page.}}&lt;br /&gt;
{{Block&lt;br /&gt;
|name=Printer&lt;br /&gt;
|image=Iso_Printer.png&lt;br /&gt;
|id=4094&lt;br /&gt;
|damage-value=Un-used.&lt;br /&gt;
|is-peripheral=Yes&lt;br /&gt;
|peripheral-api=Printer (API)&lt;br /&gt;
}}&lt;br /&gt;
The printer was added in the  [[ComputerCraft]] 1.42 update. The printer is placed next to a computer, and allows for printing text onto paper with any color of ink.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recipes ==&lt;br /&gt;
{{Crafting grid&lt;br /&gt;
 |A1=stone |B1=stone    |C1=stone&lt;br /&gt;
 |A2=stone |B2=Redstone |C2=stone&lt;br /&gt;
 |A3=stone |B3=Ink_Sac  |C3=stone&lt;br /&gt;
 |Output=printer}}{{Crafting grid&lt;br /&gt;
 |A1=Page |B1=Page |C1=Page&lt;br /&gt;
 |A2=String |B2=Leather&lt;br /&gt;
 |Output=printed_book_&lt;br /&gt;
}}&lt;br /&gt;
== Usage ==&lt;br /&gt;
To use a printer, place it adjacently but not diagonally next to a computer (left, right, top, bottom, front, or back side). Place any color ink in the single left slot, and paper in any of the top slots.&lt;br /&gt;
&lt;br /&gt;
If you are using blocks to pull/insert items from the printer the different slots are available from these sides:&lt;br /&gt;
Paper tray is accessible from the top, output paper tray is accessible from the front or bottom, and the ink slot is accessible from the back or sides.&lt;br /&gt;
&lt;br /&gt;
[[File:PrinterGUI.png|thumb|256px|GUI of the Printer]]&lt;br /&gt;
&lt;br /&gt;
== Printer API ==&lt;br /&gt;
The printer API allows programs to interact in various ways with the printer. In order for these functions to become available, you must first wrap the printer as a peripheral using [[peripheral.wrap]]().&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Printer API&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getPaperLevel]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the amount of paper available in the paper tray.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.newPage]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Starts a new page. Returns true if page got started, false if not.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.endPage]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.write]]([[string]] text)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Writes text to the paper, works the same way as [[term.write|term.write()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.setPageTitle]]([[string]] title)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the title of the page.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getInkLevel]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the amount of ink in the ink slot.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getCursorPos]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the coordinates of the cursor on the paper, works the same way as [[term.getCursorPos|term.getCursorPos()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.setCursorPos]]([[int (type)|int]] x, [[int (type)|int]] y)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the cursor pos, works the same way as [[term.setCursorPos|term.setCursorPos()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[printer.getPageSize]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the size of the paper, works the same way as [[term.getSize|term.getSize()]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Blocks]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Coroutine_(API)&amp;diff=5549</id>
		<title>Coroutine (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Coroutine_(API)&amp;diff=5549"/>
				<updated>2013-05-03T14:14:13Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Added types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| '''Bug'''&lt;br /&gt;
'''From ComputerCraft 1.3''' this API suffers from the problem of potentially spawning Java threads that live forever therefore, use of coroutines should be minimized. This is '''fixed in ComputerCraft 1.32+''', though.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''This is for the Coroutine API. For the Coroutine Object, visit [[Coroutine (type)]].''&lt;br /&gt;
&lt;br /&gt;
Coroutine is a default Lua 5.1 API defined [http://www.lua.org/manual/5.1/manual.html#5.2 here]. Please list any non-working functions on this page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;3&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Coroutine (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 100px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Return&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|coroutine}} coro&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[coroutine.create]]({{Type|function}} f)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Creates a new coroutine.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|boolean}} success, …&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[coroutine.resume]]({{Type|coroutine}} coro, [var1], [var2], ...)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Starts or resumes an existing coroutine.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|coroutine}} coro&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[coroutine.running]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the currently executing coroutine.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|string}} status&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[coroutine.status]]({{type|coroutine}} coroutine)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the status of the given coroutine.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|function}} coroutine wrapper&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[coroutine.wrap]]({{type|function}} function)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Creates a new coroutine and wraps it in a function.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[var3], [var4], …&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[coroutine.yield]]([var1], [var2], …)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Pauses the currently executing coroutine and passes control to its caller.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Coroutine States and Ancestry ==&lt;br /&gt;
Every coroutine is in one of four states:&lt;br /&gt;
* A ''suspended'' coroutine is one that has not yet been started or that has yielded. A suspended coroutine can become running if it is passed to [[coroutine.resume]].&lt;br /&gt;
* A ''running'' coroutine is one that is currently executing code. Only one coroutine can be running at a time on a particular computer. A running coroutine can become suspended if it [[coroutine.yield]], normal if it calls [[coroutine.resume]] on another coroutine, or dead by if it returns from its body function.&lt;br /&gt;
* A ''normal'' coroutine is one that, while running, resumed another coroutine (the ''child coroutine''). A normal coroutine can become running if its child calls [[coroutine.yield]] or returns from its function body.&lt;br /&gt;
* A ''dead'' coroutine is one that, while running, returned from its function body. A dead coroutine can never change state.&lt;br /&gt;
&lt;br /&gt;
While suspended and dead coroutines simply sit loose with no connections to other coroutines, normal and running coroutines have an ancestry relationship between them. Exactly one coroutine is running at any given time, and the running coroutine has no children. Every running or normal coroutine except the top-level BIOS coroutine has a parent, and this relationship forms a chain with one end (the furthest ancestor) being the top-level BIOS coroutine and the other end (the furthest descendant) being the running coroutine. Remember that only the running coroutine can actually execute code, so any functions invoked must be invoked by that coroutine. Then, calling [[coroutine.resume]] makes the chain longer by taking a previously suspended coroutine, hanging it underneath the current coroutine as a new child, and making the current coroutine normal and the new child running. Meanwhile, calling [[coroutine.yield]] makes the chain shorter by turning the currently executing coroutine into a suspended coroutine, detaching it from the chain, and letting its former parent become running.&lt;br /&gt;
&lt;br /&gt;
It is important not to confuse this coroutine chain with the function call stack. Each individual coroutine contains a complete function call stack of its own, rooted at the coroutine’s body function, whether the coroutine is running, normal, or suspended; the chain described in the previous paragraph refers to how entire coroutines are connected together.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
As the coroutine API is very tightly coupled and many of its function must be used to get any interesting results, examples are shown here instead of on the individual function pages.&lt;br /&gt;
&lt;br /&gt;
=== Using the Basic Coroutine Functions ===&lt;br /&gt;
This example demonstrates using the basic coroutine functions to pass control and data between coroutines. This example prints the numbers 1 through 17 in order, showing how control flow moves through the main program coroutine and the two created coroutines, while using assertions to show how data flows through the program:&lt;br /&gt;
&lt;br /&gt;
 -- These variables will hold the coroutine objects.&lt;br /&gt;
 local c1 = nil&lt;br /&gt;
 local c2 = nil&lt;br /&gt;
 &lt;br /&gt;
 -- This function will be the body of the first coroutine.&lt;br /&gt;
 local function f1(x)&lt;br /&gt;
   -- The main code, below, starts c1 first, passing 1.&lt;br /&gt;
   -- Thus c1 should be running, c2 should be suspended (not started yet), and x should receive the value from main, 1.&lt;br /&gt;
   -- STEP 2: Check these assumptions.&lt;br /&gt;
   print(2)&lt;br /&gt;
   assert(coroutine.status(c1) == &amp;quot;running&amp;quot;)&lt;br /&gt;
   assert(coroutine.status(c2) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
   assert(x == 1)&lt;br /&gt;
   -- STEP 3: Run c2 until it yields, start it off with the value 2.&lt;br /&gt;
   print(3)&lt;br /&gt;
   success, value = coroutine.resume(c2, 2)&lt;br /&gt;
   assert(success)&lt;br /&gt;
   -- In step 6, c2 yields and passes back the value 3.&lt;br /&gt;
   -- Then c2, having yielded, should be suspended, and c1 should be running again.&lt;br /&gt;
   -- STEP 7: Check all that.&lt;br /&gt;
   print(7)&lt;br /&gt;
   assert(coroutine.status(c1) == &amp;quot;running&amp;quot;)&lt;br /&gt;
   assert(coroutine.status(c2) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
   assert(value == 3)&lt;br /&gt;
   -- STEP 8: Run c2 again, passing it the value 4.&lt;br /&gt;
   -- Since c2 has already run before, this time the 4 will come out of the yield() instead of appear as a function parameter.&lt;br /&gt;
   print(8)&lt;br /&gt;
   success, value = coroutine.resume(c2, 4)&lt;br /&gt;
   -- In step 10, c2 yields and passes back the value 5.&lt;br /&gt;
   -- Then c2, having yielded, should be suspended, and c1 should be running again.&lt;br /&gt;
   -- STEP 11: Check all that.&lt;br /&gt;
   print(11)&lt;br /&gt;
   assert(coroutine.status(c1) == &amp;quot;running&amp;quot;)&lt;br /&gt;
   assert(coroutine.status(c2) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
   assert(value == 5)&lt;br /&gt;
   -- STEP 12: Yield, turning c1 back into a suspended coroutine and continuing execution of the main program, passing back value 6.&lt;br /&gt;
   print(12)&lt;br /&gt;
   value = coroutine.yield(6)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This function will be the body of the second coroutine.&lt;br /&gt;
 local function f2(x)&lt;br /&gt;
   -- The first time c2 is run, it is run from f1, which passes 2.&lt;br /&gt;
   -- Thus c1 should be normal (as we are nested inside it), c2 should be running, and x should receive the value from f1, 2.&lt;br /&gt;
   -- STEP 4: Check these assumptions.&lt;br /&gt;
   print(4)&lt;br /&gt;
   assert(coroutine.status(c1) == &amp;quot;normal&amp;quot;)&lt;br /&gt;
   assert(coroutine.status(c2) == &amp;quot;running&amp;quot;)&lt;br /&gt;
   assert(x == 2)&lt;br /&gt;
   -- Because c1 is not suspended, we should not be able to resume it.&lt;br /&gt;
   -- STEP 5: Check this is correct.&lt;br /&gt;
   print(5)&lt;br /&gt;
   success, value = coroutine.resume(c1)&lt;br /&gt;
   assert(not success)&lt;br /&gt;
   assert(value == &amp;quot;cannot resume normal coroutine&amp;quot;)&lt;br /&gt;
   -- STEP 6: Yield, turning c2 back into a suspended coroutine and continuing execution of c1, passing back value 3.&lt;br /&gt;
   print(6)&lt;br /&gt;
   value = coroutine.yield(3)&lt;br /&gt;
   -- In step 8, c1 resumed c2 again and passed the value 4.&lt;br /&gt;
   -- c2 should now be running again, and c1 normal again.&lt;br /&gt;
   -- STEP 9: Check all that.&lt;br /&gt;
   print(9)&lt;br /&gt;
   assert(coroutine.status(c1) == &amp;quot;normal&amp;quot;)&lt;br /&gt;
   assert(coroutine.status(c2) == &amp;quot;running&amp;quot;)&lt;br /&gt;
   assert(value == 4)&lt;br /&gt;
   -- STEP 10: Yield, turning c2 back into a suspended coroutine and continuing execution of c1, passing back value 5.&lt;br /&gt;
   print(10)&lt;br /&gt;
   value = coroutine.yield(5)&lt;br /&gt;
   -- In step 14, the main program resumed c2 directly and passed the value 7, bypassing c1.&lt;br /&gt;
   -- So c2 should be running and c1 should be suspended.&lt;br /&gt;
   -- STEP 15: Check all that.&lt;br /&gt;
   print(15)&lt;br /&gt;
   assert(coroutine.status(c1) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
   assert(coroutine.status(c2) == &amp;quot;running&amp;quot;)&lt;br /&gt;
   assert(value == 7)&lt;br /&gt;
   -- STEP 16: Now die, returning value 8 to the main program.&lt;br /&gt;
   print(16)&lt;br /&gt;
   return 8&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- Construct the two coroutines.&lt;br /&gt;
 c1 = coroutine.create(f1)&lt;br /&gt;
 c2 = coroutine.create(f2)&lt;br /&gt;
 &lt;br /&gt;
 -- Newly constructed coroutines are always suspended.&lt;br /&gt;
 assert(coroutine.status(c1) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
 assert(coroutine.status(c2) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 -- STEP 1: Run c1 until it yields, starting it off with the value 1.&lt;br /&gt;
 print(1)&lt;br /&gt;
 success, value = coroutine.resume(c1, 1)&lt;br /&gt;
 assert(success)&lt;br /&gt;
 &lt;br /&gt;
 -- In step 12, c1 should have yielded and returned the value 6.&lt;br /&gt;
 -- So now c1 and c2 should both be suspended.&lt;br /&gt;
 -- STEP 13: Check all that.&lt;br /&gt;
 print(13)&lt;br /&gt;
 assert(coroutine.status(c1) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
 assert(coroutine.status(c2) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
 assert(value == 6)&lt;br /&gt;
 &lt;br /&gt;
 -- STEP 14: Run c2 directly, NOT nested inside c1 this time, passing it the value 7.&lt;br /&gt;
 print(14)&lt;br /&gt;
 success, value = coroutine.resume(c2, 7)&lt;br /&gt;
 assert(success)&lt;br /&gt;
 &lt;br /&gt;
 -- c2 should have exited normally, returning the value 8.&lt;br /&gt;
 -- Therefore c1 should still be suspended, but c2 should be dead.&lt;br /&gt;
 -- STEP 17: Check all that.&lt;br /&gt;
 print(17)&lt;br /&gt;
 assert(coroutine.status(c1) == &amp;quot;suspended&amp;quot;)&lt;br /&gt;
 assert(coroutine.status(c2) == &amp;quot;dead&amp;quot;)&lt;br /&gt;
 assert(value == 8)&lt;br /&gt;
&lt;br /&gt;
=== Using Coroutine Wrapper Functions ===&lt;br /&gt;
This second example is virtually identical, but shows using [[coroutine.wrap]] and wrapper functions instead of the basic coroutine functions (checks of [[coroutine.status]] have been removed as the raw coroutine objects are not available):&lt;br /&gt;
&lt;br /&gt;
 -- These variables will hold the coroutine wrapper functions.&lt;br /&gt;
 local cw1 = nil&lt;br /&gt;
 local cw2 = nil&lt;br /&gt;
 &lt;br /&gt;
 -- This function will be the body of the first coroutine.&lt;br /&gt;
 local function f1(x)&lt;br /&gt;
   -- The main code, below, starts c1 first, passing 1.&lt;br /&gt;
   -- Thus c1 should be running, c2 should be suspended (not started yet), and x should receive the value from main, 1.&lt;br /&gt;
   -- STEP 2: Check these assumptions.&lt;br /&gt;
   print(2)&lt;br /&gt;
   assert(x == 1)&lt;br /&gt;
   -- STEP 3: Run c2 until it yields, start it off with the value 2.&lt;br /&gt;
   print(3)&lt;br /&gt;
   value = cw2(2)&lt;br /&gt;
   -- In step 6, c2 yields and passes back the value 3.&lt;br /&gt;
   -- Then c2, having yielded, should be suspended, and c1 should be running again.&lt;br /&gt;
   -- STEP 7: Check all that.&lt;br /&gt;
   print(7)&lt;br /&gt;
   assert(value == 3)&lt;br /&gt;
   -- STEP 8: Run c2 again, passing it the value 4.&lt;br /&gt;
   -- Since c2 has already run before, this time the 4 will come out of the yield() instead of appear as a function parameter.&lt;br /&gt;
   print(8)&lt;br /&gt;
   value = cw2(4)&lt;br /&gt;
   -- In step 10, c2 yields and passes back the value 5.&lt;br /&gt;
   -- Then c2, having yielded, should be suspended, and c1 should be running again.&lt;br /&gt;
   -- STEP 11: Check all that.&lt;br /&gt;
   print(11)&lt;br /&gt;
   assert(value == 5)&lt;br /&gt;
   -- STEP 12: Yield, turning c1 back into a suspended coroutine and continuing execution of the main program, passing back value 6.&lt;br /&gt;
   print(12)&lt;br /&gt;
   value = coroutine.yield(6)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This function will be the body of the second coroutine.&lt;br /&gt;
 local function f2(x)&lt;br /&gt;
   -- The first time c2 is run, it is run from f1, which passes 2.&lt;br /&gt;
   -- Thus c1 should be normal (as we are nested inside it), c2 should be running, and x should receive the value from f1, 2.&lt;br /&gt;
   -- STEP 4: Check these assumptions.&lt;br /&gt;
   print(4)&lt;br /&gt;
   assert(x == 2)&lt;br /&gt;
   -- Because c1 is not suspended, we should not be able to resume it.&lt;br /&gt;
   -- STEP 5: Check this is correct (we must use pcall because an error will be raised).&lt;br /&gt;
   print(5)&lt;br /&gt;
   success, value = pcall(cw1)&lt;br /&gt;
   assert(not success)&lt;br /&gt;
   -- STEP 6: Yield, turning c2 back into a suspended coroutine and continuing execution of c1, passing back value 3.&lt;br /&gt;
   print(6)&lt;br /&gt;
   value = coroutine.yield(3)&lt;br /&gt;
   -- In step 8, c1 resumed c2 again and passed the value 4.&lt;br /&gt;
   -- c2 should now be running again, and c1 normal again.&lt;br /&gt;
   -- STEP 9: Check all that.&lt;br /&gt;
   print(9)&lt;br /&gt;
   assert(value == 4)&lt;br /&gt;
   -- STEP 10: Yield, turning c2 back into a suspended coroutine and continuing execution of c1, passing back value 5.&lt;br /&gt;
   print(10)&lt;br /&gt;
   value = coroutine.yield(5)&lt;br /&gt;
   -- In step 14, the main program resumed c2 directly and passed the value 7, bypassing c1.&lt;br /&gt;
   -- So c2 should be running and c1 should be suspended.&lt;br /&gt;
   -- STEP 15: Check all that.&lt;br /&gt;
   print(15)&lt;br /&gt;
   assert(value == 7)&lt;br /&gt;
   -- STEP 16: Now die, returning value 8 to the main program.&lt;br /&gt;
   print(16)&lt;br /&gt;
   return 8&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- Construct the two coroutine wrappers.&lt;br /&gt;
 cw1 = coroutine.wrap(f1)&lt;br /&gt;
 cw2 = coroutine.wrap(f2)&lt;br /&gt;
 &lt;br /&gt;
 -- STEP 1: Run cw1 until it yields, starting it off with the value 1.&lt;br /&gt;
 print(1)&lt;br /&gt;
 value = cw1(1)&lt;br /&gt;
 &lt;br /&gt;
 -- In step 12, c1 should have yielded and returned the value 6.&lt;br /&gt;
 -- So now c1 and c2 should both be suspended.&lt;br /&gt;
 -- STEP 13: Check all that.&lt;br /&gt;
 print(13)&lt;br /&gt;
 assert(value == 6)&lt;br /&gt;
 &lt;br /&gt;
 -- STEP 14: Run c2 directly, NOT nested inside c1 this time, passing it the value 7.&lt;br /&gt;
 print(14)&lt;br /&gt;
 value = cw2(7)&lt;br /&gt;
 &lt;br /&gt;
 -- c2 should have exited normally, returning the value 8.&lt;br /&gt;
 -- Therefore c1 should still be suspended, but c2 should be dead.&lt;br /&gt;
 -- STEP 17: Check all that.&lt;br /&gt;
 print(17)&lt;br /&gt;
 assert(value == 8)&lt;br /&gt;
&lt;br /&gt;
== Interaction with Other APIs ==&lt;br /&gt;
Raw coroutines are not always safe to use with other API functions. The reason is that [[os.pullEventRaw]] (and therefore [[os.pullEvent]], which calls it) are themselves built using coroutines: &amp;lt;code&amp;gt;os.pullEventRaw&amp;lt;/code&amp;gt; actually invokes [[coroutine.yield]], passing the event type filter up to what it expects is the [[Parallel (API)|parallel API]], which would resume the coroutine once a matching event arrives. This is how the parallel API allows other code to run while one function is blocking waiting for an event. However, it means if you call &amp;lt;code&amp;gt;os.pullEventRaw&amp;lt;/code&amp;gt; ''or any other function that uses it'' while managing coroutines yourself, you will see a coroutine unexpectedly yield, with the parent [[coroutine.resume]] being passed as a return value the filter string passed to &amp;lt;code&amp;gt;os.pullEventRaw&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In this situation, it is essential that a developer carefully audit any APIs (s)he may wish to use to verify whether they could possibly block—many APIs, even those one might not expect, fall into this category. Some examples are:&lt;br /&gt;
* [[rednet.receive]] blocks until either a [[Rednet message (event)|rednet_message event]] or (if a timeout was requested) a matching [[Timer (event)|timer event]] occurs.&lt;br /&gt;
* [[Gps (API)|gps.locate]] blocks until either a number of [[Modem message (event)|modem_message events]] or (if a timeout was requested) a matching [[Timer (event)|timer event]] occurs.&lt;br /&gt;
* [[http.get]] blocks until an [[Http success (event)|HTTP success event]] or [[Http failure (event)|HTTP failure event]] occurs.&lt;br /&gt;
* [[IO (API)|io.read]] and the built-in [[read]] functions block waiting for, presumably, either [[Char (event)|char events]] or [[Key (event)|key events]].&lt;br /&gt;
* [[os.sleep]] blocks until a matching [[Timer (event)|timer event]] occurs.&lt;br /&gt;
* [[textutils.slowPrint]] calls [[os.sleep]].&lt;br /&gt;
* [[textutils.pagedPrint]] blocks until a [[Key (event)|key event]] occurs for each page.&lt;br /&gt;
* Most of the functions in the [[Turtle (API)|turtle API]] (with the exception of [[turtle.getItemCount]], [[turtle.getItemSpace]], and [[turtle.getFuelLevel]]) block waiting for a [[Turtle response (event)|turtle response event]].&lt;br /&gt;
&lt;br /&gt;
Although it is not always practical to do so, in some situations, the [[Parallel (API)|parallel API]] may be preferable to using coroutines directly, as it handles event dispatching properly. However, it does not allow chaining coroutine invocations, nor does it allow adding coroutines to the parallel set after parallel execution has started. If coroutines are to be used directly, an application may either ensure it avoids any blocking API calls, or may arrange to handle event dispatch the same way that the parallel API does so that the blocking functions work properly. For example, one might arrange the convention that the top-level coroutine in the application will call [[os.pullEvent]] and deliver any returned events to sub-coroutines, the same way that the parallel API does, thus allowing those sub-coroutines to themselves call [[os.pullEvent]], while insisting on a convention that more deeply nested coroutines never call [[os.pullEvent]] at all.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Vector_(API)&amp;diff=5548</id>
		<title>Vector (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Vector_(API)&amp;diff=5548"/>
				<updated>2013-05-03T14:11:50Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template, italicized variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The vector API provides methods to create and manipulate vectors.&lt;br /&gt;
&lt;br /&gt;
An introduction to vectors can be found on [[Wikipedia:Euclidean_vector|Wikipedia]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Vector (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vector.new]]({{type|float}} x, {{type|float}} y, {{type|float}} z)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Creates a vector.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:add]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Adds ''vectorB'' to ''vectorA'' and returns the resulting vector. Can also be used by writing vectorA + vectorB.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:sub]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Subtracts ''vectorB'' from ''vectorA'' and returns the resulting vector. Can also be used by writing vectorA - vectorB.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:mul]]({{type|float}} n)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Scalar multiplies ''vectorA'' with ''n'' and returns the resulting vector. Can also be used by writing vectorA * n.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:dot]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the dot product of ''vectorA'' and ''vectorB''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:cross]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the vector which resulted in the cross product of ''vectorA'' and ''vectorB''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:length]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the vector's length.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:normalize]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Normalizes the vector and returns the result as a new vector.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:round]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Rounds the vector coordinates to the nearest integers and returns the result as a new vector.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:tostring]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a string representation of the vector in the form of &amp;quot;x,y,z&amp;quot;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vectors act much like tables, storing the coordinate data with labels &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot; and &amp;quot;z&amp;quot;.  However, it can be worthwhile to use vectors instead of tables in certain situations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Among other things, vectors can be useful to aid in creating navigation algorithms using GPS coordinates.&lt;br /&gt;
&lt;br /&gt;
To transform GPS quickly into vector format, simply use:&lt;br /&gt;
 local a = vector.new(gps.locate())&lt;br /&gt;
&lt;br /&gt;
Then, getting the displacements between a turtle position and a desired location becomes:&lt;br /&gt;
 local b = vector.new(20, 85, 40)&lt;br /&gt;
 local c = a - b&lt;br /&gt;
 --displacement in the x direction:  c.x&lt;br /&gt;
 --displacement in the y direction:  c.y&lt;br /&gt;
 --displacement in the z direction:  c.z&lt;br /&gt;
&lt;br /&gt;
By making use of vectors, code can be cleaner and easier to follow.&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Vector_(API)&amp;diff=5547</id>
		<title>Vector (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Vector_(API)&amp;diff=5547"/>
				<updated>2013-05-03T14:09:26Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The vector API provides methods to create and manipulate vectors.&lt;br /&gt;
&lt;br /&gt;
An introduction to vectors can be found on [[Wikipedia:Euclidean_vector|Wikipedia]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Vector (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vector.new]]({{type|float}} x, {{type|float}} y, {{type|float}} z)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Creates a vector.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:add]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Adds vectorB to vectorA and returns the resulting vector. Can also be used by writing vectorA + vectorB.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:sub]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Subtracts vectorB from vectorA and returns the resulting vector. Can also be used by writing vectorA - vectorB.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:mul]]([[float (type)|float]] n)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Scalar multiplies vectorA with n and returns the resulting vector. Can also be used by writing vectorA * n.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:dot]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the dot product of vectorA and vectorB.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:cross]]([[Vector (API)|vector]] vectorB)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the vector which resulted in the cross product of vectorA and vectorB.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:length]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the vector's length.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:normalize]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Normalizes the vector and returns the result as a new vector.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:round]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Rounds the vector coordinates to the nearest integers and returns the result as a new vector.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[vectorA:tostring]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a string representation of the vector in the form of &amp;quot;x,y,z&amp;quot;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vectors act much like tables, storing the coordinate data with labels &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot; and &amp;quot;z&amp;quot;.  However, it can be worthwhile to use vectors instead of tables in certain situations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Among other things, vectors can be useful to aid in creating navigation algorithms using GPS coordinates.&lt;br /&gt;
&lt;br /&gt;
To transform GPS quickly into vector format, simply use:&lt;br /&gt;
 local a = vector.new(gps.locate())&lt;br /&gt;
&lt;br /&gt;
Then, getting the displacements between a turtle position and a desired location becomes:&lt;br /&gt;
 local b = vector.new(20, 85, 40)&lt;br /&gt;
 local c = a - b&lt;br /&gt;
 --displacement in the x direction:  c.x&lt;br /&gt;
 --displacement in the y direction:  c.y&lt;br /&gt;
 --displacement in the z direction:  c.z&lt;br /&gt;
&lt;br /&gt;
By making use of vectors, code can be cleaner and easier to follow.&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=HTTP_(API)&amp;diff=5546</id>
		<title>HTTP (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=HTTP_(API)&amp;diff=5546"/>
				<updated>2013-05-03T14:07:46Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Added types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| '''The HTTP API must be enabled in mod_ComputerCraft.cfg before being used. To enable it open .minecraft/config/ComputerCraft.cfg and change enableAPI_http=false to enableAPI_http=true.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The HTTP API allows interfacing with websites and downloading from them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
HTTP (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[http.request]]( {{type|string}} url, {{type|string}} *postData )&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sends a HTTP request to a website.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[http.get]]( {{type|string}} url )&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sends a HTTP GET request to a website.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[http.post]]( {{type|string}} url, {{type|string}} postData )&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sends a HTTP POST request to a website.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A period of time after a http.request() call is made, a &amp;quot;http_success&amp;quot; or &amp;quot;http_failure&amp;quot; event will be raised to os.pullEvent(). Arguments are the URL and a file handle if successful. http.get() blocks until this event is fired.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Help.topics&amp;diff=5539</id>
		<title>Help.topics</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Help.topics&amp;diff=5539"/>
				<updated>2013-05-02T15:56:53Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Corrected grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=help.topics&lt;br /&gt;
|api=help&lt;br /&gt;
|returns={{Type|table}} of all valid topics&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Returns a list of all available help topics. This is all files found in the directories in the search path returned by [[help.path]]. The returned table is sorted.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Lists all valid help topics.&lt;br /&gt;
|code=for _, v in ipairs(help.topics()) do&lt;br /&gt;
   print(v)&lt;br /&gt;
 end&lt;br /&gt;
|output=List of all valid help topics&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Help_(API)&amp;diff=5538</id>
		<title>Help (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Help_(API)&amp;diff=5538"/>
				<updated>2013-05-02T15:53:36Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Removed unnecessary duplicate table code on bottom&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Help API allows you to mess around with the help files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;3&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Help (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 100px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Return&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|string}} path&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[help.path]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the list of locations the API will look in for help files.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[nil]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[help.setPath]]({{Type|string}} path)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the list of locations the API will look in for help files.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|string}} path, or [[nil]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[help.lookup]]({{Type|string}} topic)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the path to the file containing the help page for &amp;lt;var&amp;gt;topic&amp;lt;/var&amp;gt;, or [[nil]] if the topic cannot be found.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;{{Type|table}} topics&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[help.topics]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a list of all available help topics.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Keys_(API)&amp;diff=5537</id>
		<title>Keys (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Keys_(API)&amp;diff=5537"/>
				<updated>2013-05-02T15:50:57Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Added type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Keys API provides a table of numerical codes corresponding to keyboard keys, suitable for decoding [[Key (event)|key events]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
keys (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[keys.getName]]({{type|int}} code)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Translates a numerical key code to a human-readable name.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although this API contains only one method, it also contains a vast number of constants, one per key, containing the numerical key codes for those keys. As of ComputerCraft 1.52, the following constants are defined:&lt;br /&gt;
* a&lt;br /&gt;
* b&lt;br /&gt;
* c&lt;br /&gt;
* d&lt;br /&gt;
* e&lt;br /&gt;
* f&lt;br /&gt;
* g&lt;br /&gt;
* h&lt;br /&gt;
* i&lt;br /&gt;
* j&lt;br /&gt;
* k&lt;br /&gt;
* l&lt;br /&gt;
* m&lt;br /&gt;
* n&lt;br /&gt;
* o&lt;br /&gt;
* p&lt;br /&gt;
* q&lt;br /&gt;
* r&lt;br /&gt;
* s&lt;br /&gt;
* t&lt;br /&gt;
* u&lt;br /&gt;
* v&lt;br /&gt;
* w&lt;br /&gt;
* x&lt;br /&gt;
* y&lt;br /&gt;
* z&lt;br /&gt;
* one&lt;br /&gt;
* two&lt;br /&gt;
* three&lt;br /&gt;
* four&lt;br /&gt;
* five&lt;br /&gt;
* six&lt;br /&gt;
* seven&lt;br /&gt;
* eight&lt;br /&gt;
* nine&lt;br /&gt;
* zero&lt;br /&gt;
* minus&lt;br /&gt;
* equals&lt;br /&gt;
* backspace&lt;br /&gt;
* tab&lt;br /&gt;
* leftBracket&lt;br /&gt;
* rightBracket&lt;br /&gt;
* enter&lt;br /&gt;
* leftCtrl&lt;br /&gt;
* semiColon&lt;br /&gt;
* apostrophe&lt;br /&gt;
* grave&lt;br /&gt;
* leftShift&lt;br /&gt;
* backslash&lt;br /&gt;
* comma&lt;br /&gt;
* period&lt;br /&gt;
* slash&lt;br /&gt;
* rightShift&lt;br /&gt;
* multiply&lt;br /&gt;
* leftAlt&lt;br /&gt;
* space&lt;br /&gt;
* capsLock&lt;br /&gt;
* f1&lt;br /&gt;
* f2&lt;br /&gt;
* f3&lt;br /&gt;
* f4&lt;br /&gt;
* f5&lt;br /&gt;
* f6&lt;br /&gt;
* f7&lt;br /&gt;
* f8&lt;br /&gt;
* f9&lt;br /&gt;
* f10&lt;br /&gt;
* numLock&lt;br /&gt;
* scollLock&lt;br /&gt;
* numPad7&lt;br /&gt;
* numPad8&lt;br /&gt;
* numPad9&lt;br /&gt;
* numPadSubtract&lt;br /&gt;
* numPad4&lt;br /&gt;
* numPad5&lt;br /&gt;
* numPad6&lt;br /&gt;
* numPadAdd&lt;br /&gt;
* numPad1&lt;br /&gt;
* numPad2&lt;br /&gt;
* numPad3&lt;br /&gt;
* numPad0&lt;br /&gt;
* numPadDecimal&lt;br /&gt;
* f11&lt;br /&gt;
* f12&lt;br /&gt;
* f13&lt;br /&gt;
* f14&lt;br /&gt;
* f15&lt;br /&gt;
* kana&lt;br /&gt;
* convert&lt;br /&gt;
* noconvert&lt;br /&gt;
* yen&lt;br /&gt;
* numPadEquals&lt;br /&gt;
* cimcumflex&lt;br /&gt;
* at&lt;br /&gt;
* colon&lt;br /&gt;
* underscore&lt;br /&gt;
* kanji&lt;br /&gt;
* stop&lt;br /&gt;
* ax&lt;br /&gt;
* numPadEnter&lt;br /&gt;
* rightCtrl&lt;br /&gt;
* numPadComma&lt;br /&gt;
* numPadDivide&lt;br /&gt;
* rightAlt&lt;br /&gt;
* pause&lt;br /&gt;
* home&lt;br /&gt;
* up&lt;br /&gt;
* pageUp&lt;br /&gt;
* left&lt;br /&gt;
* right&lt;br /&gt;
* end&lt;br /&gt;
* down&lt;br /&gt;
* pageDown&lt;br /&gt;
* insert&lt;br /&gt;
* delete&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=5536</id>
		<title>Gps (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Gps_(API)&amp;diff=5536"/>
				<updated>2013-05-02T15:50:11Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Simplified source, properly closed &amp;lt;td&amp;gt; and &amp;lt;tr&amp;gt; tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The GPS API provides a method for turtles and computers to retrieve their own locations.&lt;br /&gt;
&lt;br /&gt;
It broadcasts a PING message over [[Rednet_(API)|rednet]] and wait for responses. In order for this system to work, there must be at least 4 computers used as gps ''hosts'' which will respond and allow [[Wikipedia:Trilateration|trilateration]]. Three of these hosts should be in a plane, and the fourth should be either above or below the other three. You can set up hosts using the [[Gps (program)|gps program]].&lt;br /&gt;
&lt;br /&gt;
Note:  When entering in the coordinates for the ''host'' you need to put in the x,y,z of the computer, not the modem, as all rednet distances are measured from the block the computer is in. &lt;br /&gt;
&amp;lt;!-- do not edit this without actually testing it yourself --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;3&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Gps (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 100px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Return&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;({{Type|int}} x, {{Type|int}} y, {{Type|int}} z), or [[nil]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;gps.locate([&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;{{Type|float}} timeout [, {{Type|boolean}} debug]])&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Tries to retrieve the computer or turtles own location. On success, returns the location of the turtle’s modem. On failure (if no responses are received for &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; seconds, by default 2), returns [[nil]]. If &amp;lt;var&amp;gt;debug&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, debug messages are printed.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
  print(&amp;quot;Man I am so lost right now!&amp;quot;)&lt;br /&gt;
  local x, y, z = gps.locate(5)&lt;br /&gt;
  if x == nil then&lt;br /&gt;
    print(&amp;quot;Nope, still lost :(&amp;quot;)&lt;br /&gt;
  else&lt;br /&gt;
    print(&amp;quot;I am at &amp;quot;,x,&amp;quot; &amp;quot;,y,&amp;quot; &amp;quot;,z)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Vector Example ==&lt;br /&gt;
GPS position and navigation can be handled more easily using a [[vector (API)|vector]].&lt;br /&gt;
&lt;br /&gt;
  local home = vector.new(45, 85, 20)&lt;br /&gt;
  local position = vector.new(gps.locate(5))&lt;br /&gt;
  local displacement = position - home&lt;br /&gt;
  &lt;br /&gt;
  print(&amp;quot;I am &amp;quot;, displacement.tostring(), &amp;quot; away from home!!!&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
code&amp;gt;true&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Textutils_(API)&amp;diff=5535</id>
		<title>Textutils (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Textutils_(API)&amp;diff=5535"/>
				<updated>2013-05-02T15:41:34Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Changed to use type template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedsWork|Needs &amp;lt;s&amp;gt;5&amp;lt;/s&amp;gt; 3 function pages, 1 function descriptions. ''[[User:AfterLifeLochie|AfterLifeLochie]] 02:40, 29 November 2012 (MSK)''}}&lt;br /&gt;
The Textutils API is used to format and manipulate strings easily.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Textutils (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.slowPrint]]({{type|string}} text, {{type|int}} rate)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Slowly prints the text. Only difference is, it leaves a new-line after it.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.slowWrite]]({{type|string}} text, {{type|int}} rate)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Slowly writes the text.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.formatTime]]({{type|int}} time, {{type|boolean}} TwentyFourHour)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Put a time into it, and it spews it out in a different format. Example: print(textutils.formatTime(os.time(), false))&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.tabulate]]({{type|table}} table, {{type|table}} table2, ...)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Prints tables in an ordered form. Each table is a row, the column(s)' width is auto-adjusted.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.pagedTabulate]]({{type|table}} table, {{type|table}} table2, ...)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Prints tables in an ordered form, like [[textutils.tabulate]]. However, it waits for confirmation before scrolling down..&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.pagedPrint]]({{type|string}} text, {{type|string}} confirmation_lines)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Prints string ''text'' onto the screen, but waits for confirmation before scrolling down.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.serialize]]({{type|table}} table)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a string representation of the table ''table'' for storage or transmission.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.unserialize]]({{type|string}} text)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns a table reassembled from the string ''text''.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[textutils.urlEncode]]({{type|string}} text)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Makes a string safe to encode into a url. Spaces are replaced with +s. Unsafe characters such as '\', '£' and '}' are translated into ASCII code and preceded with a % for transmission. For reference visit: [http://www.blooberry.com/indexdot/html/topics/urlencoding.htm].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Modem_(API)&amp;diff=5534</id>
		<title>Modem (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Modem_(API)&amp;diff=5534"/>
				<updated>2013-05-02T15:34:39Z</updated>
		
		<summary type="html">&lt;p&gt;Smiley43210: Change to use newer table style.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''This page is for the modem API. For the blocks, see [[Modem]].''&lt;br /&gt;
&lt;br /&gt;
With the advent of ComputerCraft 1.5, the behavior of modems has changed somewhat drastically. Although the Rednet API still has the same functionality, it is really just a wrapper for what is a completely different system underneath.&lt;br /&gt;
&lt;br /&gt;
The major change introduced to modems in this version of ComputerCraft is channels: Channels are essentially open networks which can be opened, closed, and listened on by any computer within range. To interact with channels, one must wrap/interact directly with the peripheral as opposed to the previous interaction with the rednet API.&lt;br /&gt;
&lt;br /&gt;
Here is a list of functions available from modems:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Modem (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Method Name&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background: #E0E0E0; padding: .4em; font-weight:bold;&amp;quot;&amp;gt;Description&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[modem.isOpen]]({{type|int}} channel)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Checks to see if ''channel'' is open&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[modem.open]]({{type|int}} channel)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Opens ''channel'' to allow for listening. The channel specified must be larger than 0 and less than 65535&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[modem.close]]({{type|int}} channel)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Closes an open channel to disallow listening&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[modem.closeAll]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Closes all open channels&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[modem.transmit]]({{type|int}} channel, {{type|int}} replyChannel, {{type|string}} message)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Transmits a message on the specified channel&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[modem.isWireless]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns true if the modem is wireless; false if it is wired&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sending Messages==&lt;br /&gt;
Sending messages is simple and does not require that you open any channels. Simply use the transmit function like so:&lt;br /&gt;
  &amp;lt;span&amp;gt;&lt;br /&gt;
  local modem = peripheral.wrap(&amp;quot;right&amp;quot;) --Wraps the modem on the right side.&lt;br /&gt;
  modem.transmit(3, 1, &amp;quot;Hello world!&amp;quot;)  &lt;br /&gt;
  peripheral.call(&amp;quot;right&amp;quot;, &amp;quot;transmit&amp;quot;, 3, 1, &amp;quot;This will also work!&amp;quot;)&lt;br /&gt;
  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What did that do? First I wrapped the peripheral in order to interact with it. Second, I used modem.transmit(channel, replyChannel, message) in order to send my message. In case you were wondering, the reply channel is captured by the listening computer and suggests which channel they should reply on.&lt;br /&gt;
&lt;br /&gt;
==Receiving Messages==&lt;br /&gt;
Receiving messages requires that you be familiar with events. As of this moment, there is no api which cuts out events from the process. Here is an example of how to receive messages:&lt;br /&gt;
  &amp;lt;span&amp;gt;&lt;br /&gt;
  local modem = peripheral.wrap(&amp;quot;left&amp;quot;)&lt;br /&gt;
  modem.open(3)--Open channel 3 so that we can listen on it&lt;br /&gt;
  local event, modemSide, senderChannel, &lt;br /&gt;
    replyChannel, message, senderDistance = os.pullEvent(&amp;quot;modem_message&amp;quot;)&lt;br /&gt;
  print(&amp;quot;I just received a message from: &amp;quot;..senderChannel)&lt;br /&gt;
  print(&amp;quot;I should apparently reply on: &amp;quot;..replyChannel)&lt;br /&gt;
  print(&amp;quot;The modem receiving this is located on the &amp;quot;..modemSide..&amp;quot; side&amp;quot;)&lt;br /&gt;
  print(&amp;quot;The message was: &amp;quot;..message)&lt;br /&gt;
  print(&amp;quot;The sender is: &amp;quot;..senderDistance..&amp;quot; blocks away from me.&amp;quot;)&lt;br /&gt;
  &amp;lt;/span&amp;gt;&lt;br /&gt;
So what did I do? Quite simply, I called os.pullEvent() with the string argument &amp;quot;modem_message&amp;quot;, which blocks all other events from being returned. When the &amp;quot;modem_message&amp;quot; event is captured, it returns the arguments: event, modemSide, senderChannel, replyChannel, message, senderDistance. I captured these and then printed them out.&lt;br /&gt;
&lt;br /&gt;
==Keep in Mind...==&lt;br /&gt;
* You can only open 128 channels at any given time.&lt;br /&gt;
* The max channel you can open is 65535.&lt;br /&gt;
* You can listen on more than one channel at a time. For example, if I have channel 3 and channel 5 open and somebody sends a message on channel 5, I will still receive it. If they send a message on channel 3, I will receive that.&lt;br /&gt;
* Sending messages does not require you to open any channels prior to sending it.&lt;br /&gt;
* If you aren't receiving a message when you think you should, check to make sure that you have opened the channel first!&lt;br /&gt;
* Modems and channels are not secure! If you are sending a message over rednet, it is available to any computer listening on the sent channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripheral APIs]]&lt;/div&gt;</summary>
		<author><name>Smiley43210</name></author>	</entry>

	</feed>