`array`

Syntax

- a := array(i<,i>...)
Creates and returns a new array type.

- The size and contents of the array depend on the type and number of arguments.
- If one or more integers is given, then the dimension of the array is given by the number of integers and the size in each dimension is given by the integer value. The initial array values are all 0.
- If a list is given, then if no other arguments follow the array is 1-dimensional of the same length as the list with matching entries. If integer arguments follow, then the array has the same number of dimensions as the number of integers with the size of each dimension specified by the integer. The total size of the array in this case must be equal to or less than the size of the list in the first argument. The contents of the array are filled by the contents of the list.
- If a vector is given, then the array is a 2 or 3 length 1-dimensional array with floating point values that match the components of the vector.
- If a matrix is given, then the array is 2-dimensional with size matching the matrix and all entries of type double with values that match the matrix entries.
- If a tensor is given, then the array is created as a 1-dimensional array six elements long containing the components of the tensor.

Returns: a - A newly created array type. Arguments: i - One of six types that can be used to create an array. i2 - Optional further integers that can be used to specify array dimensions and size.

Was this helpful? ... | FLAC3D © 2019, Itasca | Updated: Aug 19, 2023 |