Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Arrays are created by enclosing comma-delimited expressions in square brackets like so:
["a", "b", "c"]
Arrays use zero-base indexing and can be referenced in the usual manner:
a = [1,4,3,6,5];
b = a[1] // b = 4
**begin note**
Comments start with a double slash (//) and go to the end of the line. The examples in this appendix frequently use comments to show return values.
**end note**
Note that array references only work for arrays of one dimension. For example, c[1][2] is not allowed (presuming c is an array of arrays). Multidimensional arrays can be dereferenced using the pick operator (described momentarily).

  • No labels