Difference between revisions of "Getmetatable"

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/(global)|(global)]]<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.</translate>
 
<translate>If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.</translate>
Line 8: Line 9:
 
(table) = getmetatable(object)
 
(table) = getmetatable(object)
 
</source>
 
</source>
 +
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
 
'''object''': (object) <translate>Object from which to get metatable</translate> <br/>
 
'''object''': (object) <translate>Object from which to get metatable</translate> <br/>
 +
 
=== <translate>Return values</translate> ===
 
=== <translate>Return values</translate> ===
 
'''<translate>Returns</translate>''' (table) <translate>metatable</translate><br/>
 
'''<translate>Returns</translate>''' (table) <translate>metatable</translate><br/>
 +
 +
{{(global)}}

Revision as of 04:04, 11 February 2020


Available since: Gideros 2011.6
Class: (global)

Description

If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.

(table) = getmetatable(object)

Parameters

object: (object) Object from which to get metatable

Return values

Returns (table) metatable