AINE: Accelerated Interactive Narrator Engine
  • Download
  • References
  • Games
  • Wiki
  • Facebook Twitter
  • Name

    List

  • Alias

    Array

  • Examples

    Player:
    {

    Event: Game_Start {
    this.list = []
    // Declares and empty list

    for (this.i = 0; i < 3; i++){
    list += [i]
    // Puts the value of i into a list. The two lists are then combined, with i at the end
    }

    for (i = 0; i < list.length; i++){
    print(list[i] + (i+1 < list.length ? ", " : ""))
    // Output: 0, 1, 2
    }

    this.str = list.join(", ")
    print(str)
    // Output: 0, 1, 2
    }
    }
  • Description

    A list, a.k.a. an array, can hold a sequence of similar or different data types. The List data type is declared using brackets. The values between the brackets, separated by comma, are the entries in the list.

    You can access properties and methods of a list after it has been declared. These are useful for accessing specific data in the list.
  • Syntax

    • []
    • [entry]
    • [entry1, entry2, ..., entryN]
  • Methods

    • indexOf()

      Returns the index value of the first occurrence of the given string, number, boolean, or object
    • join()

      Returns a string combined from all the entries in the list
  • Properties

    • length

      [read-only] Holds the number of entries in the List
  • Related

    [ ] (brackets)

  • Contact
  • Terms of Use
  • GitHub
  • Drakkashi.com

The copyright of all images rendered by me goes to their respective owners.
© 2008 Daniel Svejstrup Christensen