
2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-111
Also see
None
io.type()
This function checks whether or not a given object is a file handle.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
type
= io.type(
obj
)
type
Indicates whether the object is an open file handle
obj
Object to check
Details
Returns the string
"file"
if the object is an open file handle. If it is not an open file handle,
nil
is
returned.
Also see
(on page 7-109)
io.write()
This function writes data to the default output file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
io.write()
io.write(
data1
)
io.write(
data1, data2
)
io.write(
data1, ..., dataN
)
data1
The data to be written
data2
The data to be written
dataN
The data to be written
...
One or more values separated by commas
Details
All data parameters must be either strings or numbers.
Data is not immediately written to a file when you use the
io.write()
function. The
io.write()
function buffers data; it may not be written to the USB flash drive immediately. Use the
io.flush()
function to immediately write buffered data to the drive.
Also see
(on page 7-107)