Coroutine.status

From ComputerCraft Wiki
Revision as of 18:46, 28 November 2012 by AfterLifeLochie (Talk | contribs) (Moved to CAT:LuaCoreFunctions)

Jump to: navigation, search
Grid Redstone.png  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

Grid paper.png  Example
Writes the status of the running coroutine.
Code
print(coroutine.status(coroutine.running()))
Output running