Keithley 2601 Reference Manual page 102

System sourcemeter 2600 series (smu)
Hide thumbs Also See for 2601:
Table of Contents

Advertisement

Section 2: TSP Programming
String library functions
This library provides generic functions for string manipulation, such as finding and extracting
substrings. When indexing a string in TSL, the first character is at position 1 (not 0 as in ANSI C).
Indices may be negative and are interpreted as indexing backwards, from the end of the string.
Thus, the last character is at position 1, and so on.
string.byte(s [,i])
string.char(i1, i1, ...)
string.format(fs, e1,
e2, ...)
string.len(s)
string.lower(s)
string.rep(s, n)
string.sub(s, i [,j])
string.upper(s)
Math library functions
This library is an interface to most of the functions of the ANSI C math library. All trigonometric
functions work in radians. The functions math.deg() and math.rad() convert between radians
and degrees.
math.abs(x)
math.acos(x)
math.asin(x)
math.atan(x)
math.atan2(y,x)
math.ceil(x)
math.cos(x)
math.deg(x)
math.exp(x)
2-54
Series 2600 System SourceMeter® Instruments Reference Manual
Returns the internal numerical code of the i-th character of
string s, or nil if the index is out of range.
Receives 0 or more integers. Returns a string with length
equal to the number of arguments, in which each character
has the internal numerical code equal to its corresponding
argument.
Returns a formatted version of its variable number of
arguments following the description given in its first
argument, which must be a string. The format string follows
the same rules as the print family of ANSI C functions. The
only differences are that the options/modifiers *, l, L, n, p,
and h are not supported. The options c, d, E, e, f, g, G, I, o, u,
X, and x all expect a numeric argument, where s expects a
string argument. String values to be formatted with %s
cannot contain embedded zeros.
Returns the length of the strings.
Returns a copy of the string s with all uppercase letters
changed to lowercase.
Returns a string that is the concatenation of n copies of the
string s.
Returns the substring of s that starts at i and continues until j.
i and j may be negative. If j is absent, then it is assumed to
be equal to –1, which is the same as the string length. In
particular, the call
string.sub(s,1,j)
with length j, and
string.sub(s, -i)
length i.
Returns a copy of the string s with all lowercase letters
changed to uppercase.
Returns the absolute value of the argument x.
Returns the principal value of the trigonometric arc cosine
function of x.
Returns the principal value of the trigonometric arc sine function
of x.
Returns the principal value of the trigonometric arc tangent
function of x.
Returns the principal value of the trigonometric arc tangent
function of y/x.
Returns the smallest floating-point number not less than x whose
value is an exact mathematical integer.
Returns the trigonometric cosine function of x.
Returns the value of x in degrees, where x is in radians.
Returns the exponential function of x; that is, e
base of the natural logarithms.
Return to
Section Topics
returns a prefix s
returns a suffix s with
x
, where e is the
2600S-901-01 Rev. C / January 2008

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

26362602261126122635

Table of Contents