
2606B System SourceMeter® Instrument Reference Manual
Section 6: Instrument programming
2606B-901-01 Rev. B / May 2018
6-33
Script editor
The script editor is where you write, modify, and debug scripts.
To open and display a script file, double-click the file name in the project navigator. You can have
multiple script files open in the script editor at the same time. Each open script file is displayed on a
separate tab.
To display another script file that is already open, click the tab that contains the script in the script
editor area.
Outline view
The outline view allows you to navigate through the structure of the active script in the script editor.
Double-clicking a variable name or icon causes the first instance of the variable in the active script to
be highlighted.
This view shows:
•
Names of local and global variables
•
Functions referenced by the active script in the script editor
•
Parameters
•
Loop control variables
•
Table variables
•
Simple assignments to table fields
The Outline tab is visible by default in the TSP perspective.
Icon
Name
Examples
Global function variable
function gFunction()
end
Local function variable
local function lFunction()
end
Anonymous function
myTest(function() return 1 end)
Global table variable
gTable = { }
Local table variable
local lTable = { }
Other table field
testTable.unit1 = "This is unit 1"
testTable.unit2 = "This is unit 2"
Global variable
gVariable = 3
Local variable
local lVariable = 5
Table method
gTable = { }
function gTable:testmethod()
end
[ ]
Nonfunction block
statement (example 1)
if true == true then
local var
end
Nonfunction block
statement (example 2)
for index = 1, 10 do
end