arrays.rst 522 B

12345678910111213141516171819
  1. .. _arrays:
  2. =================
  3. Arrays
  4. =================
  5. .. index::
  6. single: Arrays
  7. An array is a sequence of values indexed by a integer number from 0 to the size of the
  8. array minus 1. Arrays elements can be obtained through their index.::
  9. local a=["I'm a string", 123]
  10. print(typeof a[0]) //prints "string"
  11. print(typeof a[1]) //prints "integer"
  12. Resizing, insertion, deletion of arrays and arrays elements is done through a set of
  13. standard functions (see :ref:`built-in functions <builtin_functions>`).