EasyManuals Logo
Home>Keithley>Measuring Instruments>2600a series

Keithley 2600a series User Manual

Keithley 2600a series
696 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 #326 background imageLoading...
Page #326 background image
19-4 Return to Section Topics 2600AS-901-01 Rev. B / September 2008
Section 19: Remote Commands Series 2600A System SourceMeter® Instruments Reference Manual
Operators
Arithmetic Operators: Relational Operators: Logical Operators:
+ (addition) < (less than) and
- (subtraction) > (greater than) or
* (multiplication) <= (less than or equal) not
/ (division) >= (greater than or equal)
- (negation) ~= (not equal)
== (equal)
Functions
TSL allows you to define functions. A function can take a predefined number of parameters and
return multiple parameters if desired.
Here is an example of how to define a function and call it:
function add_two(parameter1, parameter2)
return(parameter1 + parameter2)
end
print(add_two(3, 4))
Below is an alternate syntax for defining a function. Functions are first-class values in TSL, which
means functions can be stored in variables, passed as arguments, and returned as results if
desired.
add_three = function(parameter1, parameter2, parameter3)
return(parameter1 + parameter2 + parameter3)
end
print(add_three(3, 4, 5))
Here is a function that returns multiple parameters; sum, difference, and ratio of the two numbers
passed to it:
function sum_diff_ratio(parameter1, parameter2)
psum = parameter1 + parameter2
pdif = parameter1 – parameter2
prat = parameter1 / parameter2
return psum, pdif, prat
end
sum, diff, ratio = sum_diff_ratio(2,3)
print(sum)
print(diff)
print(ratio)
Output of code above:
7
12
5
-1
0.66666

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 2600a series and is the answer not in the manual?

Keithley 2600a series Specifications

General IconGeneral
BrandKeithley
Model2600a series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals