READSKIP

Reads any number of unwanted characters from an existing text file opened for reading by the OPEN command.

Syntax:

READSKIP n
 

Discussion:

The file must be already open, see the keyword OPEN for details. If n is positive, READSKIP reads off exactly n characters from the file. If n is negative, READSKIP reads to the end of the current line. The read characters are discarded. This function allows faster access to large files by effectively skipping over any number of unwanted characters. 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
READSKIP 59
READSTRING A$
PRINT A$
CLOSE
 

Related Keywords:

OPEN, CLOSE READ, READNEXT, READSTRING

Next: