Interactive SourceMeter® Instrument Reference Manual Section 7:
Introduction to TSP operation
2450-901-01 Rev. B/September 2013 7-13
Variable types
Variables can be one of the following types.
Variable types and values
Variable type returned Value Notes
The type of the value nil, whose
main property is to be different from
any other value; usually it represents
the absence of a useful value.
Boolean is the type of the values
false and true. In Lua, both nil
and false make a condition
false; any other value makes it
.
All numbers are real numbers; there
is no distinction between integers
and floating-point numbers.
Hexadecimal and binary values are
also handled as the number type in
sequence of words or
characters
a block of code
Functions perform a task or compute
and return values.
an array New tables are created with { }
braces. For example,
To determine the type of a variable, you can call the type() function, as shown in the examples
below.
The output you get from these examples may vary depending on the data format that is set.
Example: Nil
print(x, type(x))
Example: Boolean
print(y, type(y))