Difference between revisions of "Table.create"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2022.3<br/> '''Class:''' table<br/> === Description === Creates a table with the array portion allocated to the given number of e...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Creates a table with the array portion allocated to the given number of elements, optionally filled with the given value.
 
Creates a table with the array portion allocated to the given number of elements, optionally filled with the given value.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(table) = table.create(count,value)
 
(table) = table.create(count,value)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===

Latest revision as of 15:33, 13 July 2023

Available since: Gideros 2022.3
Class: table

Description

Creates a table with the array portion allocated to the given number of elements, optionally filled with the given value.

(table) = table.create(count,value)

Parameters

count: (number) number of elements
value: (any) value to fill the table with optional

Return values

Returns (table) the newly created table