Keithley 708B Reference Manual page 209

Switching matrix
Hide thumbs Also See for 708B:
Table of Contents

Advertisement

Section 6: Instrument programming
Example: Boolean
Code
y = false
print(y, type(y))
Example: String and number
Code
x = "123"
print(x, type(x))
x = x + 7
print(x, type(x))
Example: Function
Code
function add_two(parameter1, parameter2)
return parameter1 + parameter2
end
print(add_two(3, 4), type(add_two))
Example: Table
Code
atable = {1, 2, 3, 4}
print(atable, type(atable))
print(atable[1])
print(atable[4])
To delete a global variable, assign nil to the global variable. This removes the global variable from
the runtime environment.
6-18
Models 707B and 708B Switching Matrix Reference Manual
Output
false
Output
123
string
Adding a number to x forces its type to number
1.3000000e+02
Output
7.0000000e+00
Notes and Output
Defines a table with four numeric elements.
Note that the "table" value (shown here as
a096cd30) will vary.
table: a096cd30
1.0000000e+00
4.0000000e+00
707B-901-01 Rev. A / August 2010
boolean
number
function
table

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

707b

Table of Contents