Better and easier syntax for arrays: Difference between revisions

From GiderosMobile
No edit summary
removed language stuff
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
<!-- GIDEROSOBJ:Better and easier syntax for arrays -->
<!-- GIDEROSOBJ:Better and easier syntax for arrays -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2017.11<br/>
'''Available since:''' Gideros 2017.11<br/>
=== <translate>Description</translate> ===
 
<translate>a=b[c<b> , </b>d] &emsp; The same as 'a=b[c][d]' but shorter and easier to understand and read.</translate>
=== Description ===
=== <translate>Examples</translate> ===
'''a=b[c<b> , </b>d]''' &emsp; the same as &emsp; ''''a=b[c][d]'''' &emsp; but shorter and easier to understand and read.
'''Simple examples:'''
 
=== Examples ===
'''Simple examples'''
<source lang="lua">
<source lang="lua">
a={{1,2,3},{4,5,6},{7,8,9}}
a={{1,2,3},{4,5,6},{7,8,9}}
Line 13: Line 14:
a[2,2]=7 -- change value of a[2,2] to 7, same as a[2][2]=7
a[2,2]=7 -- change value of a[2,2] to 7, same as a[2][2]=7
</source>
</source>
{|-
{|-
| style="width: 50%; vertical-align:top;"|
| style="width: 50%; vertical-align:top;"|
=== <translate>Methods</translate> ===
=== Methods ===
| style="width: 50%; vertical-align:top;"|
| style="width: 50%; vertical-align:top;"|
=== <translate>Events</translate> ===
=== Events ===
=== <translate>Constants</translate> ===
=== Constants ===
|}
|}


{{GIDEROS IMPORTANT LINKS}}
{{GIDEROS IMPORTANT LINKS}}

Revision as of 00:32, 6 October 2021

Supported platforms:
Available since: Gideros 2017.11

Description

a=b[c , d]   the same as   'a=b[c][d]'   but shorter and easier to understand and read.

Examples

Simple examples

a={{1,2,3},{4,5,6},{7,8,9}}
b=a[2,2] -- b will be 5, easier to read than b=a[2][2]
a[2,2]=7 -- change value of a[2,2] to 7, same as a[2][2]=7

Methods

Events

Constants