User manual
Series 3700 System Switch/Multimeter Reference Manual Section 13: Instrument Control Library (ICL)
3700S-901-01 Rev. C / July 2008 13-189
io.open()
Function
Opens a file for later access.
Usage
file, err, errnum = io.open(path, mode)
file: The descriptor of the opened file.
err: A string with an error message an error occurred.
errnum: Number representing the error number.
path: The path of the file to open. This path may be absolute or relative to the current
working directory.
mode: A string representing the intended access mode. The mode attribute is
optional; the default is "r".
Remarks
The mode string can be any of the standard C language fopen modes, including:
"r": Read mode.
"w": Write mode.
"a": Append mode.
If an error is encountered, it is logged to the error queue, and the command returns
nil and the error string.
This command is not remotely accessible.
io.output()
Function
Assigns a previously opened file or opens a new file as the default output file.
Usage
io.output(filein)
fileout = io.output()
filein: A file descriptor to assign, or the path of a file to open, as the default output file.
The path may be absolute or relative to the current working directory. This parameter
is optional; if absent, the command returns the absolute path to the current default
output file (fileout).
fileout: The absolute path to the default output file.
Remarks
Any error encountered is logged to the error queue.
The remotely-accessible version of this command does not accept a file descriptor
parameter.
io.read()
Function
Reads data from the default input file.
Usage
data = io.read(format)
data: The data read from the file. The number of return values matches the number of
values in format.
format: A string or number indicating the type of data to be read. Any number of
format parameters may be passed to this command, each corresponding to a returned
data value. Optional; default is "*l".