EasyManuals Logo

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 #273 background imageLoading...
Page #273 background image
Model 2651A High Power System SourceMeter® Instrument Reference Manual Section 6: Instrument programming
2651A-901-01 Rev. A / March 2011 6-29
Example: Break with infinite loop
a, b = 0, 1
while true do
print(a,b)
a, b = b, a + b
if a > 500 then
break
end
end
This example uses a break statement
that causes the while loop to exit if the
value of a becomes greater than 500.
Output:
0.00000e+00 1.00000e+00
1.00000e+00 1.00000e+00
1.00000e+00 2.00000e+00
2.00000e+00 3.00000e+00
3.00000e+00 5.00000e+00
5.00000e+00 8.00000e+00
8.00000e+00 1.30000e+01
1.30000e+01 2.10000e+01
2.10000e+01 3.40000e+01
3.40000e+01 5.50000e+01
5.50000e+01 8.90000e+01
8.90000e+01 1.44000e+02
1.44000e+02 2.33000e+02
2.33000e+02 3.77000e+02
3.77000e+02 6.10000e+02
Tables and arrays
Lua makes extensive use of the data type table, which is a flexible array-like data type. Table indices
start with 1. Tables can be indexed not only with numbers, but with any value (except nil). Tables
can be heterogeneous, which means that they can contain values of all types (except nil).
Tables are the sole data structuring mechanism in Lua; they may be used to represent ordinary
arrays, symbol tables, sets, records, graphs, trees, and so on. To represent records, Lua uses the
field name as an index. The language supports this representation by providing a.name as an easier
way to express a["name"].

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