Go forward to Data Type Summary.
Go backward to Built-in Summary.
Go up to Variables/Fields.
Arrays
------
Arrays are subscripted with an expression between square brackets
(`[' and `]'). Array subscripts are *always* strings; numbers are
converted to strings as necessary, following the standard conversion
rules (see Conversion of Strings and Numbers: Conversion.).
If you use multiple expressions separated by commas inside the square
brackets, then the array subscript is a string consisting of the
concatenation of the individual subscript values, converted to strings,
separated by the subscript separator (the value of `SUBSEP').
The special operator `in' may be used in an `if' or `while'
statement to see if an array has an index consisting of a particular
value.
if (val in array)
print array[val]
If the array has multiple subscripts, use `(i, j, ...) in array' to
test for existence of an element.
The `in' construct may also be used in a `for' loop to iterate over
all the elements of an array. See Scanning all Elements of an Array: Scanning an Array.
An element may be deleted from an array using the `delete' statement.
See Arrays in `awk': Arrays, for more detailed information.