User Guide : Using Content Extraction Language : Language Syntax and Examples : var [ num ]
 
Share this page             
var [ num ]
This is the syntax of a one-dimensional array. It behaves like any variable, but multiple values can be assigned and referenced to var (the array) by varying the value of num (the subscript). Arrays should always be re-initialized when their contents are no longer needed. See for (var in array) and clearvars for more information.
Example
len = length($0); idx = 0; #
‘ Store all input line characters individually in an array
while( len - idx +1)
{ character[idx] = substr( $0, idx + 1, 1 ); idx += 1; }