Difference between revisions of "Coroutine.create"
From ComputerCraft Wiki
(THIS IS NOT JAVA) |
|||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=coroutine.create | |name=coroutine.create | ||
− | |args=[[Function (type)|function]] | + | |args=[[Function (type)|function]] function |
|api=Coroutine | |api=Coroutine | ||
− | |returns=[[coroutine]] | + | |returns=[[coroutine]] new coroutine |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|desc=Creates a new coroutine | |desc=Creates a new coroutine | ||
Line 10: | Line 10: | ||
{{Example | {{Example | ||
|desc=creates a coroutine. | |desc=creates a coroutine. | ||
− | |code | + | |code=coroutine.create(function() print("Hello World") end) |
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Revision as of 12:17, 4 December 2012
Function coroutine.create | |
Creates a new coroutine | |
Syntax | coroutine.create(function function) |
Returns | coroutine new coroutine |
Part of | ComputerCraft |
API | Coroutine |
Examples
Example | |
creates a coroutine. | |
Code |
coroutine.create(function() print("Hello World") end) |