EasyManuals Logo
Home>Keithley>Measuring Instruments>2651A

Keithley 2651A Reference Manual

Keithley 2651A
800 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 #266 background imageLoading...
Page #266 background image
Section 6: Instrument programming Model 2651A High Power System SourceMeter® Instrument Reference Manual
6-22 2651A-901-01 Rev. A / March 2011
Logical 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 this value 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 the and and the or
logical operators use shortcut evaluation, that is, the second operand is evaluated only if necessary.
Example
print(10 or errorqueue.next())
print(nil or "a")
print(nil and 10)
print(false and errorqueue.next())
print(false and nil)
print(false or nil)
print(10 and 20)
1.00000e+01
a
nil
false
false
nil
2.00000e+01
String concatenation
String operators
Operator Description
..
Concatenates two strings. If both operands are strings or number, they are converted
to strings according to Lua coercion rules, as follows:
• Any arithmetic operation applied to a string tries to convert that string to a number,
following the usual rules.
• Whenever a number is used where a string is expected, the number is converted to a
string, in a reasonable format.
Example: Concatenation
print(2 .. 3)
print("Hello " .. "World")
23
Hello World
Operator precedence
Operator precedence in Lua follows the order below (from higher to lower priority).

Table of Contents

Other manuals for Keithley 2651A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 2651A and is the answer not in the manual?

Keithley 2651A Specifications

General IconGeneral
BrandKeithley
Model2651A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals