Fandom

Pico-8 Wiki

Costatus

162pages on
this wiki
Add New Page
Comments0 Share
costatus( cor )

Tests whether a coroutine is suspended (returns true) or dead (returns false).

cor
The coroutine to test.

A coroutine is a special kind of function that can yield control back to the caller without completely exiting. The caller can then resume the coroutine as many times as needed until the function exits.

The costatus() function takes a coroutine object and returns its status as a string value, either 'running' 'suspended' or 'dead'. You can use this to test whether the most recent call to coresume() yielded or terminated.

Examples Edit

See cocreate() for an example.

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.