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 #604 background imageLoading...
Page #604 background image
Section
13: Introduction to TSP commands 2470 High Voltage SourceMeter Instrument
Reference Manual
13-18 2470-901-01 Rev. A / May 2019
Example 2
hex = function (i) return "0x"..string.format("%X", i) end
print(hex(0x54 | 0x55))
print(hex(0x54 & 0x66))
Set the format to return hexadecimal values, then OR two hexadecimal values and AND two
hexadecimal values.
Output:
0x55
0x44
Example 3
hex = function (i) return "0x"..string.format("%X", i) end
a, b = 0b01010100, 0b01100110
print(hex(a), "&", hex(b), "=", hex(a & b))
Set the format to return hexadecimal values, define binary values for a and b, then AND a and b.
Output:
0x54 & 0x66 = 0x44
String concatenation
String operators
Operator Description
..
Concatenates two strings. If either argument is a number, it is coerced to a string
(in a reasonable format) before concatenation.
Example: Concatenation
print(2 .. 3)
print("Hello " .. "World")
Output:
23
Hello World
Operator precedence
Operator precedence in Lua follows the order below (from higher to lower priority):
• ^ (exponentiation)
• not, - (unary), ! (logical NOT)
• *, /, <<, >>
• +, –, &, |, ^^
• .. (concatenation)
• <, >, <=, >=, ~=, !=, ==
• and
• or

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