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

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
<!-- GIDEROSOBJ:Better and easier syntax for arrays -->
+
'''Available since:''' Gideros 2017.11<br/>
'''<translate>Supported platforms</translate>:''' [[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/>
 
=== <translate>Description</translate> ===
 
<translate><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>
+
=== 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'''<br/>
+
 
<source lang="lua">  
+
=== Examples ===
 +
<syntaxhighlight lang="lua">
 
a={{1,2,3},{4,5,6},{7,8,9}}
 
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]
+
b=a[2,2] -- b will be 5, easier to read than b=a[2][2]
a[2,2]=7 -- same as a[2][2]=7</source>
+
a[2,2]=7 -- change value of a[2,2] to 7, same as a[2][2]=7
{|-
+
</syntaxhighlight>
| style="width: 50%; vertical-align:top;"|
+
 
=== <translate>Methods</translate> ===
+
{{GIDEROS IMPORTANT LINKS}}
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
|}
 

Latest revision as of 15:26, 13 July 2023

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
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

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