Concatenation; Branching - Keithley 3700 series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700 series:
Table of Contents

Advertisement

Series 3700 System Switch/Multimeter Reference Manual
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 concatenation 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
Document Number: 3700S-901-01 Rev. A / August 2007
Section 2: TSP Programming Fundamentals
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.
2-29

Advertisement

Table of Contents
loading

Table of Contents