list
Syntax
- l := list(<i>)
Creates a new list object.
- How the list is created depends on the type that is provided as an argument.
- If no arguments are provided, an empty list is created.
- If an integer is provided, then a list of that length is created. (See the
list.sequence
andlist.create
functions for other options). - If a string is provided,then a list the size of the string length is created. Each entry in the list is a 1 character long string containing a different character from the string, in order.
- If a vector is provided, then the list is the size of the vector (2 or 3) and each entry is a component of the vector.
- If a matrix is provided, then the list is the total size of the matrix (row * column) and each entry in the list is an entry in the matrix (row 1 first, then row 2, etc).
- If a map is provided, then a list of the map values is created.
- If a pointer to a container of objects is provided, then a list of pointers to every object in the container is returned.
Returns: l - newly created list Arguments: i - value used to create the list
Was this helpful? ... | 3DEC © 2019, Itasca | Updated: Feb 25, 2024 |