Difference between revisions of "Coroutine.create"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/coroutine|coroutine]]<br/>
+
'''Class:''' [[coroutine]]<br/>
=== <translate>Description</translate> ===
+
 
<translate>Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object with type "thread".</translate>
+
=== Description ===
<source lang="lua">
+
Creates a new coroutine, with body f. f must be a Lua function.
(coroutine) = coroutine.create(f)
+
<syntaxhighlight lang="lua">
</source>
+
(thread) = coroutine.create(f)
=== <translate>Parameters</translate> ===
+
</syntaxhighlight>
'''f''': (function) <translate>lua function</translate> <br/>
+
 
=== <translate>Return values</translate> ===
+
=== Parameters ===
'''<translate>Returns</translate>''' (coroutine) <translate>created coroutine</translate><br/>
+
'''f''': (function) Lua function<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (thread) created coroutine<br/>
 +
 
 +
{{Coroutine}}

Latest revision as of 14:26, 13 July 2023

Available since: Gideros 2011.6
Class: coroutine

Description

Creates a new coroutine, with body f. f must be a Lua function.

(thread) = coroutine.create(f)

Parameters

f: (function) Lua function

Return values

Returns (thread) created coroutine