You can split a text string into its component fields and store each field in a separate array element using a text string’s
Split() method. This can be useful after reading a record from a file into a variable. By default, the delimiter is any white-space character (tab, space or newline):
The result is to create the array-variable !ArrayOfFields (if it does not already exist) with the element
!FIELDS[1] set to
'123',
!FIELDS[2] set to
'456', and
!FIELDS[3] set to
'789'.
In this example, comma is used as the delimiter. !ArrayOfFields is created if it does not already exist with the element
!FIELDS[1] set to
'123',
!FIELDS[2] set to
'456',
!FIELDS[3] created but set to zero length, and
!FIELDS[4] set to
'789'.
You can combine an array-append method with a text-string
Split() method in a single command to append the fields of a text string to the end of an existing array variable, thus: