Scan the specified lines of the header using the specified separator. The results from the scan are entered in the Name/Value list.
The scan is performed twice. On the first pass, a search is done for the separator on each line of the header. If the separator is found in a line, all characters to the left of the first occurrence of the separator are assigned to the variable name, and all characters to the right of the first occurrence of the separator are assigned to the value of that variable. Thus, a header line such as "Acquisition Date: 10th July 2003" will result in a variable named Acquisition Date and a value for that variable equal to 10th July 2003.
The header lines are then scanned a second time. In this second scan, the lines are searched for the separator and each token found in the line is treated as a separate variable. The variables are then named by the line number and the token position in which they were found. So, in the above example, two variables will be found, having these names and values :
- L1V1 Acquisition Date
- 1V2 10th July 2003
This scan method allows users to extract variables from header lines which are of the form of "cquisition Date: 10th July 2003" and also from header lines such as "10, 20, 100, 40, 5". In the latter case, the second scan will extract 5 variables from this line, thus retrieving all values (assuming comma is used as the separator). Note that the dual scan process can result in unwanted variables being added to the list.