Difference between revisions of "Coroutine.status"

From ComputerCraft Wiki
Jump to: navigation, search
(4559)
(Remove example that doesn’t show anything interesting on its own, improve description, and use type template)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Content missing.
+
{{Function
 +
|name=coroutine.status
 +
|args={{Type|coroutine}} coro
 +
|api=Coroutine
 +
|returns={{Type|string}} status
 +
|addon=ComputerCraft
 +
|desc=Returns the status of <var>coro</var>. This is one of “running”, if the coroutine is running; “suspended”, if the coroutine has not yet been started or it called [[coroutine.yield]] and has not yet been resumed; “normal”, if the coroutine called [[coroutine.resume]] and that call has not yet returned (equivalently, if <var>coro</var> is an ancestor of the currently executing coroutine); or “dead”, if its function returned.
 +
|examples=Please see [[Coroutine (API)]] for a worked example of using all the coroutine functions.
 +
}}
 +
 
 +
[[Category:Lua_Core_Functions]]

Latest revision as of 18:24, 22 April 2013

Grid Redstone.png  Function coroutine.status
Returns the status of coro. This is one of “running”, if the coroutine is running; “suspended”, if the coroutine has not yet been started or it called coroutine.yield and has not yet been resumed; “normal”, if the coroutine called coroutine.resume and that call has not yet returned (equivalently, if coro is an ancestor of the currently executing coroutine); or “dead”, if its function returned.
Syntax coroutine.status(coroutine coro)
Returns string status
Part of ComputerCraft
API Coroutine

Examples

Please see Coroutine (API) for a worked example of using all the coroutine functions.