Difference between revisions of "Coroutine.create"

From GiderosMobile
Line 3: Line 3:
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/coroutine|coroutine]]<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/coroutine|coroutine]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <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>
 
<translate>Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object with type "thread".</translate>
Line 8: Line 9:
 
(coroutine) = coroutine.create(f)
 
(coroutine) = coroutine.create(f)
 
</source>
 
</source>
 +
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
 
'''f''': (function) <translate>lua function</translate> <br/>
 
'''f''': (function) <translate>lua function</translate> <br/>
 +
 
=== <translate>Return values</translate> ===
 
=== <translate>Return values</translate> ===
 
'''<translate>Returns</translate>''' (coroutine) <translate>created coroutine</translate><br/>
 
'''<translate>Returns</translate>''' (coroutine) <translate>created coroutine</translate><br/>
 +
 +
{{Coroutine}}

Revision as of 21:00, 11 February 2020


Available since: Gideros 2011.6
Class: coroutine

Description

Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object with type "thread".

(coroutine) = coroutine.create(f)

Parameters

f: (function) lua function

Return values

Returns (coroutine) created coroutine