Difference between revisions of "Coroutine.status"
From ComputerCraft Wiki
(4559) |
Evil dan2wik (Talk | contribs) (Undone vandalism. IP requires ban.) |
||
Line 1: | Line 1: | ||
− | + | {{Function | |
+ | |name=coroutine.status | ||
+ | |api=Coroutine | ||
+ | |returns=[[string]] status | ||
+ | |addon=ComputerCraft | ||
+ | |desc=Returns the status of the coroutine; returns "running", if the coroutine is running; "suspended" if the coroutine was yielded or not running; "normal" if the coroutine is active but not running (that is, it has resumed another coroutine); and "dead" if it finished its function. | ||
+ | |examples= | ||
+ | {{Example | ||
+ | |desc=Writes the status of the running coroutine. | ||
+ | |code=print(coroutine.status(coroutine.running())) | ||
+ | |output=running | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | [[Category:Lua_Core_Functions]] |
Revision as of 10:33, 4 December 2012
Function coroutine.status | |
Returns the status of the coroutine; returns "running", if the coroutine is running; "suspended" if the coroutine was yielded or not running; "normal" if the coroutine is active but not running (that is, it has resumed another coroutine); and "dead" if it finished its function. | |
Syntax | coroutine.status() |
Returns | string status |
Part of | ComputerCraft |
API | Coroutine |
Examples
Example | |
Writes the status of the running coroutine. | |
Code |
print(coroutine.status(coroutine.running())) |
Output | running |