DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(gawk) Arrays Summary

Info Catalog (gawk) Built-in Summary (gawk) Variables/Fields (gawk) Data Type Summary
 
 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 ( 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 a conditional context 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.   Scanning All Elements of an Array
 Scanning an Array.
 
    You can remove an element from an array using the `delete' statement.
 
    You can clear an entire array using `delete ARRAY'.
 
     Arrays in `awk' Arrays.
 
Info Catalog (gawk) Built-in Summary (gawk) Variables/Fields (gawk) Data Type Summary
automatically generated byinfo2html