EasyManuals Logo

Tektronix KEITHLEY 2600B Series User Manual

Tektronix KEITHLEY 2600B Series
834 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #418 background imageLoading...
Page #418 background image
Series 2600B System SourceMeter® instrument Reference Manual Section 9: TSP command reference
2600BS-901-01 Rev. F/August 2021 9-97
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 performs 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.
Example
local fileName = "/usb1/myfile.txt"
if fs.is_file(fileName) then
os.remove(fileName)
print("Removing file")
else
print("Nothing removed")
end
print("fileVar:read")
myfile, myfile_err, myfile_errnum = io.open(fileName, "w")
myfile:write("Line 1")
myfile:close()
do
myfile, myfile_err, myfile_errnum = io.open(fileName, "r")
contents = myfile:read("*a")
print(contents)
end
myfile:close()
os.remove(fileName)
Reads data from the input file.
Also see
fileVar:write() (on page 9-99)
io.input() (on page 9-118)
io.open() (on page 9-119)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix KEITHLEY 2600B Series and is the answer not in the manual?

Tektronix KEITHLEY 2600B Series Specifications

General IconGeneral
BrandTektronix
ModelKEITHLEY 2600B Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals