Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-106 2601B-PULSE-901-01A April 2020
Also see
io.input() (on page 11-104)
io.open() (on page 11-104)
io.read()
This function reads data from the default input file.
Usage
data1 = io.read()
data1 = io.read("format1")
data1, data2 = io.read("format1", "format2")
data1, ..., dataN = io.read("format1", ..., "formatN")
The data read from the file
The data read from the file
The data read from the file; the number of return values matches the number of
format values given
A string or number indicating the type of data to be read
A string or number indicating the type of data to be read
A string or number indicating the type of data to be read
One or more entries (or values) separated by commas
Details
The format parameters may be any of the following:
Returns the whole file, starting at the present position; returns an empty string if it is at
the end of file
Returns the next line, skipping the end of line; returns nil if the present file position is at
the end of file
Returns a string with up to N characters; returns an empty string if N is zero (0); returns
nil if the present file position is at the end of file
Any number of format parameters may be passed to this command, each corresponding to a returned
data value.
If no format parameters are provided, the function will perform as if the function was passed the value
"*l".