Difference between revisions of "Coroutine.create"

From ComputerCraft Wiki
Jump to: navigation, search
(wub)
(THIS IS NOT JAVA)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=coroutine.create
 
|name=coroutine.create
|args=[[Function (type)|function]] function
+
|args=[[Function (type)|function]]
 
|api=Coroutine
 
|api=Coroutine
 
|returns=[[coroutine]]
 
|returns=[[coroutine]]

Revision as of 12:12, 4 December 2012


Grid Redstone.png  Function coroutine.create
Creates a new coroutine
Syntax coroutine.create(function)
Returns coroutine
Part of ComputerCraft
API Coroutine

Examples

Grid paper.png  Example
creates a coroutine.
Code
func = coroutine.create(function() print("Hello World") end) func()