Section 7: TSP command reference Series 2600B System SourceMeter® Instrument Reference Manual7-110 2600BS-901-01 Rev. B / May 2013Usagedata1 = io.read()data1 = io.read(format1)data1, data2 = io.read(format1, format2)data1, ..., dataN = io.read(format1, ..., formatN)data1 The data read from the filedata2 The data read from the filedataN The data read from the file; the number of return values matches the numberof format values givenformat1 A string or number indicating the type of data to be readformat2 A string or number indicating the type of data to be readformatN A string or number indicating the type of data to be read... One or more entries (or values) separated by commasDetailsThe format parameters may be any of the following:Format parameter Description"*N" Returns a number"*a" Returns the whole file, starting at the present position; returns an empty string if it is at theend of file"*l" Returns the next line, skipping the end of line; returns nil if the present file position is at theend of fileN Returns a string with up to N characters; returns an empty string if N is zero (0); returns nil ifthe present file position is at the end of fileAny number of format parameters may be passed to this command, each corresponding to a returned datavalue.If no format parameters are provided, the function will perform as if the function was passed the value "*l".Also seeNoneio.type()This function checks whether or not a given object is a file handle.Type TSP-Link accessible Affected by Where saved Default valueFunction NoUsagetype = io.type(obj)type Indicates whether the object is an open file handleobj Object to checkDetailsReturns the string "file" if the object is an open file handle. If it is not an open file handle, nil is returned.Also seeio.open() (on page 7-108)