Series 2600 System SourceMeters Reference Manual TSP Programming Fundamentals 2-61
Return to Section 2 topics 2600S-901-01 Rev. A / May 2006
Counting from one to four,
in steps of two:
1 One
3 Three
Counting elements in list
on numeric index
1 One
2 Two
3 Three
4 Four
5 Five
6 Six
Counting elements in list
using repeat
1 One
2 Two
3 Three
4 Four
5 Five
6 Six
Standard libraries
In addition to the standard programming constructs above, TSL includes standard
libraries that contain useful functions for string manipulation, mathematics, etc.
TSL also includes instrument control extension libraries. These libraries provide
programming interfaces to the instrumentation accessible by the TSP. These
libraries are automatically loaded when the TSP starts and do not need to be
managed by the programmer.
Base library functions
print(x)
Prints the argument x to the active host interface, using the
tostring() function to convert x to a string.
collectgarbage([limit])
Sets the garbage-collection threshold to the given limit (in
Kbytes) and checks it against the byte counter. If the new
threshold is smaller than the byte counter, then TSL
immediately runs the garbage collector. If the limit parameter
is absent, it defaults to 0 (thus forcing a garbage-collection
cycle). See Note for more information.
gcinfo()
Returns the number of Kbytes of dynamic memory that TSP
is using.