Section 9: TSP command reference Series 2600B System SourceMeter® instrument Reference Manual
9-100 2600BS-901-01 Rev. F/August 2021
Also see
fileVar:close() (on page 9-94)
fileVar:flush() (on page 9-95)
io.close() (on page 9-117)
io.flush() (on page 9-118)
io.open() (on page 9-119)
format.asciiprecision
This attribute sets the precision (number of digits) for all numbers returned in the ASCII format.
Instrument reset
Recall setup
Usage
precision = format.asciiprecision
format.asciiprecision = precision
A number representing the number of digits to be printed for numbers printed with
the print(), printbuffer(), and printnumber() functions; must be a number
between 1 and 16
Details
This attribute specifies the precision (number of digits) for numeric data printed with the print(),
printbuffer(), and printnumber() functions. The format.asciiprecision attribute is only
used with the ASCII format. The precision value must be a number from 0 to 16.
Note that the precision is the number of significant digits printed. There is always one digit to the left
of the decimal point; be sure to include this digit when setting the precision.
Example
format.asciiprecision = 10
x = 2.54
printnumber(x)
format.asciiprecision = 3
printnumber(x)
Output:
2.540000000e+00
2.54e+00
Also see
format.byteorder (on page 9-101)
format.data (on page 9-102)
print() (on page 9-170)
printbuffer() (on page 9-171)
printnumber() (on page 9-172)