User manual

Section 2: TSP Programming Fundamentals Series 3700 System Switch/Multimeter Reference Manual
2-42 3700S-901-01 Rev. C / July 2008
--
--------------- REPEAT loop ---------------
--
print("Counting elements in list")
print("using repeat")
element = 1
repeat
print(element, list[element])
element = element + 1
until not list[element]
Output of code above:
Counting from one to three:
1 One
2 Two
3 Three
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, and more. TSL also includes instrument control extension
libraries, which provide programming interfaces to the instrumentation
accessible by the TSP
TM
. These libraries are automatically loaded when the TSP
starts and do not need to be managed by the programmer.