Difference between revisions of "Table.maxn"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2022.3<br/> '''Class:''' table<br/> === Description === Returns the maximum numeric key of the provided table, or zero if the tab...") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Returns the maximum numeric key of the provided table, or zero if the table has no numeric keys. Gaps in the table are ignored. | Returns the maximum numeric key of the provided table, or zero if the table has no numeric keys. Gaps in the table are ignored. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(number) = table.maxn(t) | (number) = table.maxn(t) | ||
</source> | </source> |
Revision as of 14:31, 13 July 2023
Available since: Gideros 2022.3
Class: table
Description
Returns the maximum numeric key of the provided table, or zero if the table has no numeric keys. Gaps in the table are ignored. <syntaxhighlight lang="lua"> (number) = table.maxn(t) </source>
Parameters
t: (table) table to check
Return values
Returns (number) table maximum numeric key or zero