Native Inspect Manual (H06.04+)

Native Inspect Manual528122-005
5-1
5 Using Tcl Scripting
Introduction to Tcl on page 5-1
Learning Tcl on page 5-1
Using Native Inspect Tcl Commands on page 5-1
Loading a Tcl Script on page 5-2
Using Variables Defined in a Tcl Script on page 5-2
Programming Native Inspect Tcl Commands on page 5-2
Namespaces and Package Loading Rules on page 5-3
Tcl Examples on page 5-5
Tcl Commands Provided by Native Inspect on page 5-7
Introduction to Tcl
Native Inspect includes Version 8.0 of the open-source Tool Command Language (Tcl),
which enables you to develop macros that can automate debugging operations. You
can write Tcl scripts made up of built-in Tcl commands, and you can write your own Tcl
commands.
Tcl scripts enable you to extend the power and functionality of Native Inspect. Tcl can
help you create custom debugging commands suited for a particular domain or
application. For example, if you are developing a complex application, you could also
provide Tcl commands that aid in debugging the application.
Tcl Version 8.0 is the base scripting engine for Native Inspect. Some new primitives
have been added to facilitate management on the NonStop system.
Learning Tcl
For more information about Tcl and about Tcl Version 8.0, see:
http://www.tcl.tk/
http://www.tcl.tk/man/tcl8.0/
http://www.tcl.tk/software/tcltk/8.0.html
http://www.tcl.tk/doc/compiler.html
http://www.tcl.tk/scripting/primer.html
http://www.tcl.tk/doc/styleGuide.pdf
Using Native Inspect Tcl Commands
The Tcl command-line interpreter is part of Native Inspect, but Native Inspect
commands have priority over Tcl commands.