Better and easier syntax for arrays

From GiderosMobile
Revision as of 15:26, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

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

<syntaxhighlight lang="lua"> 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 </source>