System SourceMeter® Instrument Reference Manual  Section 7: 
 
2600BS-901-01 Rev. C / August 2016  7-103 
 
Details 
The precision of numeric values can be controlled with the format.asciiprecision attribute. The 
byte order of format.SREAL, format.REAL, format.REAL32, and format.REAL64 can be 
selected with the format.byteorder attribute. 
REAL32 and SREAL select the same single precision format. REAL and REAL64 select the same 
double precision format. They are alternative identifiers. Selecting which to use is a matter of 
preference. 
The IEEE Std 754 binary formats use four bytes for single-precision values and eight bytes for 
double-precision values. 
When data is written with any of the binary formats, the response message starts with #0 and ends 
with a new line. When data is written with the ASCII format, elements are separated with a comma 
and space. 
 
 
Binary formats are not intended to be interpreted by humans. 
 
Example 
 
format.asciiprecision = 10 
x = 3.14159265 
format.data = format.ASCII 
printnumber(x) 
format.data = format.REAL64 
printnumber(x) 
Output a number represented by x in ASCII 
using a precision of 10, then output the 
same number in binary using double 
precision format. 
Output: 
3.141592650e+00 
Also see 
format.asciiprecision (on page 7-101) 
format.byteorder (on page 7-101) 
printbuffer() (on page 7-166) 
printnumber() (on page 7-169) 
 
fs.chdir() 
This function sets the current working directory. 
Type  TSP-Link accessible  Affected by  Where saved  Default value 
Function  Yes 
   
 
 
Usage 
workingDirectory = fs.chdir(path) 
 
Returned value containing the working path 
A string indicating the new working directory path