![background image](http://html2.mh-extra.com/html/keithley/interactive-sourcemeter-2450/interactive-sourcemeter-2450_reference-manual_4033478503.webp)
Section 7: Introduction to TSP operation
Model 2450 Interactive SourceMeter® Instrument Reference Manual
7-12
2450-901-01 Rev. B/September 2013
Function and variable name restrictions
You cannot use Lua reserved words and top level command names for function or variable names.
You cannot use the following Lua reserved words for function or variable names. If you attempt to
assign these, the error message -285, "TSP Syntax error at line x: unexpected symbol near '
word
' " is
displayed, where
word
is the Lua reserved word.
Lua reserved words
and
for
or
break
function
repeat
do
if
return
else
in
then
elseif
local
true
end
nil
until
false
not
while
Values and variable types
In Lua, you use variables to store values in the run-time environment for later use.
Lua is a dynamically-typed language; the type of the variable is determined by the value that is
assigned to the variable.
Variables in Lua are assumed to be global unless they are explicitly declared to be local. A global
variable is accessible by all commands. Global variables do not exist until they have been assigned a
value.