Difference between revisions of "Better and easier syntax for arrays"

From GiderosMobile
Line 2: Line 2:
 
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Available since:''' Gideros 2017.11<br/>
 
'''Available since:''' Gideros 2017.11<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />
 
Operators to return the larger or smaller of two values.<br /><br />
 
Operators to return the larger or smaller of two values.<br /><br />
  
 
a=b[c<b> , </b>d] &emsp; The same as 'a=b[c][d]' but shorter and easier to understand and read.<br /></translate>
 
a=b[c<b> , </b>d] &emsp; The same as 'a=b[c][d]' but shorter and easier to understand and read.<br /></translate>
=== Examples ===
+
=== <translate>Examples</translate> ===
 
'''Simple examples'''<br/>
 
'''Simple examples'''<br/>
 
<source lang="lua">  
 
<source lang="lua">  
Line 15: Line 15:
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== Methods ===
+
=== <translate>Methods</translate> ===
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== Events ===
+
=== <translate>Events</translate> ===
=== Constants ===
+
=== <translate>Constants</translate> ===
 
|}
 
|}

Revision as of 07:28, 24 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2017.11

Description


Operators to return the larger or smaller of two values.

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][b]
a[2,2]=7 -- same as a[2][2]=7

Methods

Events

Constants