EasyManuals Logo
Home>Keithley>Multimeter>3720-ST

Keithley 3720-ST User Manual

Keithley 3720-ST
936 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 #282 background imageLoading...
Page #282 background image
Series 3700A System Switch/Multimeter Reference Manual Section 9: Introduction to TSP operation
3700AS-901-01 Rev. D/June 2018 9-9
loadscript filetest
-- Script to write two lines to a file.
-- Append two lines to the same file.
-- Read the entire file contents and print them.
-- Open the file for writing.
myfile = io.open("/usb1/myfiletest", "w")
if io.type(myfile) == "file" then
myfile:write("This is my first line WRITING\n")
myfile:write("This is my next line WRITING\n")
myfile:close()
-- Open the file for appending.
myfile = io.open("/usb1/myfiletest", "a")
if io.type(myfile) == "file" then
myfile:write("This is my first APPEND line\n")
myfile:write("This is my next APPEND line\n")
myfile:close()
-- Open the file for reading.
myfile = io.open("/usb1/myfiletest", "r")
if io.type(myfile) == "file" then
filecontents = myfile:read("*a")
print("the file contains:")
print()
print(filecontents)
myfile:close()
else
print("The file did not open correctly for reading")
end
else
print("The file did not open correctly for appending")
end
else
print("The file did not open correctly for writing")
end
endscript
After downloading the above script, type filetest() to execute the script. Here are the output
results:
the file contains:
This is my first line WRITING
This is my next line WRITING
This is my first APPEND line
This is my next APPEND line

Table of Contents

Other manuals for Keithley 3720-ST

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 3720-ST and is the answer not in the manual?

Keithley 3720-ST Specifications

General IconGeneral
BrandKeithley
Model3720-ST
CategoryMultimeter
LanguageEnglish

Related product manuals