Native Inspect Manual (H06.03+)

Table Of Contents
Using Tcl Scripting
Native Inspect Manual528122-003
4-8
Tcl Commands Provided by Native Inspect
Tcl Commands Provided by Native Inspect
Native Inspect includes the built-in commands that are provided by open-source Tcl
(such as package provide and namespace eval). In addition to these, the commands
listed in Table 4-1 are provided specifically for the NonStop platform.
Table 4-1. Tcl Commands for NonStop TNS/E Systems
Tcl Command Description
expr expression Evaluates a 32-bit expression.
format expression Outputs a formatted 32-bit expression.
lexpr expression Evaluates a long expression (both 64-bit arithmetic
and logical expressions). For expression, specify
the high and low 32 bits separated by a space.
mpexpr expression Evaluates a multiple precision expression.
Can have an arbitrary operand. There is no
automatic truncation, so be careful when performing
bit-shifting operations.
mpformat expression Outputs a formatted multiple-precision value.
Example:
tcl puts (mpformat 0x%x [mpexpr
0xffffffff00000000]] 0x0xffffffff00000000
{PUT | puts} expression Displays output; PUT does not include a newline,
while PUTS does. PUT output is also captured to a log
file if you use the Native Inspect log command to
record a debug session.
symexpr Passes the results of a symbolic expression to the Tcl
script. Typically used to assign a return value to a Tcl
variable. Is essentially the output of the Native
Inspect print command passed to the Tcl result buffer.
The result might be a single value or multiple values.
Example:
(eInspect 3,301): tcl set x [symexpr
NUMCPLUS
(eInspect 3,301): tcl puts $x
15