1 V/READ X,Y,Z match.dat 6x,3(F4.1) ! /Data/
v/draw X
v/draw Y ! S
v/draw Z ! S
match.dat
2 Title: File used for tests of the MATCH parameter in V/READ
Data : 1.0 2.0 3.0
Data : 2.0 3.0 4.0
Data : 3.0 4.0 5.0
Data : 4.0 5.0 6.0
2 This line will be ignored by a V/READ with MATCH
Data : 5.0 6.0 7.0
Data : 6.0 7.0 8.0
Data : 7.0 8.0 9.0
Data : 8.0 9.0 1.0
Data : 9.0 1.0 2.0
2 End
This example shows how the MATCH parameter can be used in order to
read only a subset of a file. MATCH is used to specify a pattern
string, restricting the vector filling only to the records in the file
which verify the pattern. Example of patterns:
/string/ match a string (starting in column 1)
-/string/ do not match a string (starting in column 1)
/string/(n) match a string, starting in column n
/string/(*) match a string, starting at any column
When the MATCH parameter is used, the command V/READ reads
the file in two passes:
to find how many lines should be read in order to create vectors with
the proper length.
to read the lines where the MATCH parameter is found.