# Whole Array Assignment > [HTML Version](whole-array-assignment.htm) _Reviewed and Revised December 2023_ ASB provides the following two convenient methods for assigning elements to an array in a single operation from a CSV-formatted string. This topic addresses the first method; see [INPUT CSV into Array](input_csv_into_array.htm.md) for the second). **ary() = ** and **INPUT CSV #ch, ary() ** Where: ary() is a [DIMX](dynamic_arrays_(dimx).htm.md) array is a string expression in a CSV compatible format. The operation follows the same general rules as INPUT CSV into an array, i.e. the array elements can be fixed length or dynamic elements and the array extent can be fixed or auto\_extend. In the case of an auto\_extend array, the extent will be reset for each assignment statement. Likewise, the string expression can have comma, tab or pipe delimiters and may contain quoted elements; leading and trailing spaces are trimmed. **Example** dimx a(0), s, 0, auto\_extend a() = "red,green,blue" a() = "Golden Retriever | Doberman | German Shepard | Chihuahua" The first assignment would result in an array with an extent of 3: a(1) = "red"; a(2) = "blue"; a(3) = "green". The second assignment would result in an array of an extent of 4: a(1) = Golden Retriever"; a(2) = "Doberman"; a(3) = "German Shepherd"; a(4) = "Chihuahua". **Comments** Note that for maximum generality, the array should be of type S,0 with the auto\_extend flag. However, if you know the source expression consists only of numbers or of fields of a limited length, you can adjust the array declaration to be use a more specific type or size. If the array is not declared with the auto\_extend flag and there are more fields in the expression than elements in the array, the additional fields will be ignored. **History** 2023 September, A-Shell 6.5.1741: The CSV assignment convenience operator (see 6.5.1739.0) now recognizes the delimiter set via MX\_CSVDELIM[xs](keyword-types.htm.md). 2023 August, A-Shell 6.5.1739: Feature added to A-Shell.