EasyManuals Logo

Tektronix Keithley SourceMeter 2470 Reference Manual

Tektronix Keithley SourceMeter 2470
995 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #603 background imageLoading...
Page #603 background image
2470
High Voltage SourceMeter Instrument Reference Manual Section 13:
Introduction to TSP commands
2470-901-01 Rev. A / May 2019 13-17
Bitwise operators
Operator Description
&
AND
|
OR
^^
exclusive OR
<<
bitwise shift left
>>
bitwise shift right
!
logical NOT
Logical and bitwise operators
The logical operators in Lua are and, or, and not. All logical operators consider both false and
nil
as false and anything else as true.
The operator not always returns false or true.
The conjunction operator and returns its first argument if the first argument is false or nil;
otherwise, and returns its second argument. The disjunction operator or returns its first argument if
this value is different from nil and false; otherwise, or returns its second argument. Both and
and
or
use shortcut evaluation, that is, the second operand is evaluated only if necessary.
The example output you get may vary depending on the data format settings of the instrument.
Example 1
print(10 or eventlog.next())
print(nil or "a")
print(nil and 10)
print(false and eventlog.next())
print(false and nil)
print(false or nil)
print(10 and 20)
Output:
10
a
nil
false
false
nil
20

Table of Contents

Other manuals for Tektronix Keithley SourceMeter 2470

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix Keithley SourceMeter 2470 and is the answer not in the manual?

Tektronix Keithley SourceMeter 2470 Specifications

General IconGeneral
BrandTektronix
ModelKeithley SourceMeter 2470
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals