Coroutine.resume

From ComputerCraft Wiki
Jump to: navigation, search
Grid Redstone.png  Function coroutine.resume
Starts or resumes an existing coroutine. The second and subsequent parameters are passed as parameters to coro’s body if this is the first resumption of coro, or appear as return values from coroutine.yield otherwise. The coroutine calling this function becomes the parent of coro.
Syntax coroutine.resume(coroutine coro, [var1], [var2], …)
Returns boolean true and the values returned from coro’s body (if it returned) or passed to coroutine.yield (if it yielded) on success, or false and a message if coro cannot be resumed (e.g. because it is not suspended) or if its body throws an error
Part of ComputerCraft
API Coroutine

Examples

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

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox