Series 3700 System Switch/Multimeter Reference Manual
Section 2
:
TSP Programming Fundamentals
Document Number: 3700S-901-01 Rev. A / August 2007
2-29
print(not nil)
print(not false)
print(not 0)
print(not not nil)
Output of code above:
true
true
false
false
Concatenation
TSL denotes the string con
catenation operator by ―..‖ (two dots). If any of its operands is a
number, TSL converts that number to a string:
print("Hello ".."World")
print(0 .. 1)
Output of code above:
Hello World
01
Branching
TSL uses the ―if‖ keyword to do conditional branching.
--
-------------------------------- IF blocks ------------------------
--
if 0 then
print("Zero is true!")
else
print("Zero is false.")
end
Zero IS true! This is a contrast to C
where
0 evaluates false. In TSL, ―nil‖ is false
and everything else is true.
This is
if expression 1
.