READ_LOCALE
Reads data from an existing text file opened for reading by the OPEN command.
Syntax:
READ_LOCALE x READ_LOCALE x, y READ_LOCALE x,y,z,a,b,c,q
Discussion:
The file must be already open, see the keyword OPEN for details. Each READ command reads a single line from the file. The first valid data field from this line is placed in the variable first listed. The data from the second field is placed in the second variable listed, if any. Therefore, the number of variables listed in the read command should match the number of columns in the text file. Numeric data in the file should be delimited by spaces. The data may be in free-form, and is internally promoted to double precision assuming character currently selected in Windows settings as decimal separator. In order to use period as decimal separator use READ keyword. A maximum of 2000 characters can be read in on any single line. The maximum number of variable arguments is 199; for reading longer lines with more arguments use READNEXT_LOCALE or READNEXT instead. The variables listed must be valid ZPL variable names.
Always CLOSE a file after all the data has been read. See the function EOFF.
Example:
PRINT "Reading the double-column file TEST.DAT!" OPEN "C:\DATA\TEST.DAT" READ_LOCALE x1, y1 READ_LOCALE x2, y2 READ_LOCALE x3, y3 CLOSE Related Functions: EOFF Related Keywords: OPEN, CLOSE, READ, READNEXT, READNEXT_LOCALE, READSKIP, READSTRING
Next: