Filevar:read() - Keithley 3700A Series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700A Series:
Table of Contents

Advertisement

Series 3700A System Switch/Multimeter Reference Manual

fileVar:read()

This function reads data from a file.
Type
TSP-Link accessible
Function
No
Usage
data1 = fileVar:read()
data1 = fileVar:read(format1)
data1, data2 = fileVar:read(format1, format2)
data1, ..., datan = fileVar:read(format1, ..., formatn)
data1
data2
datan
fileVar
format1
format2
formatn
...
Details
The format parameters may be any of the following:
"*n": Returns a number.
"*a": Returns the whole file, starting at the current position (returns an empty string if the current file
position is at the end of the file).
"*l": Returns the next line, skipping the end of line; returns nil if the current file position is at the
end of file.
n: Returns a string with up to n characters; returns an empty string if n is zero; returns nil if the
current file position is at the end of file.
If no format parameters are provided, the function will perform as if the function is passed the value
"*l".
Any number of format parameters may be passed to this command, each corresponding to a returned
data value.
Also see
File I/O
(on page 9-27)
fileVar:write()
io.input()
io.open()
3700AS-901-01 Rev. D/June 2018
Affected by
First data read from the file
Second data read from the file
Last data read from the file
The descriptor of the file to be read
A string or number indicating the first type of data to be read
A string or number indicating the second type of data to be read
A string or number indicating the last type of data to be read
One or more entries (or values) separated by commas
(on page 11-245)
(on page 11-254)
(on page 11-255)
Section 11: TSP command reference
Where saved
Default value
11-243

Advertisement

Table of Contents
loading

Table of Contents