READSTRING

Reads data from an existing text file opened for reading by the OPEN command.

Syntax:

READSTRING A$ 
 

Discussion:

The file must be already open, see the keyword OPEN for details. Each READ command reads a single line from the file. The entire line read is placed in the variable listed. A maximum of 359 characters can be read in and placed in a single string. The variable listed must be a valid ZPL string variable name, although it does not need to be previously referenced. Always CLOSE a file after all the data has been read. See the function EOFF.

Example:

PRINT "Reading the contents of file TEST.DAT!" 
OPEN TEST.DAT
READSTRING A$ 
PRINT A$
CLOSE
 

Related Keywords:

OPEN, CLOSE READ, READNEXT, READSKIP

Next: