|
GEOS SDK TechDocs
|
|
dbrk ...
|
delassoc ...
debug
debug <proc-name>*
Examples:
-
"debug"
- Enter the Tcl debugger immediately.
-
"debug fooproc"
-
Enter the Tcl debuffer when the interpreter is about to execute the command "fooproc".
This command is used when debugging Tcl commands. It sets a breakpoint at the start of any Tcl command. Also serves as a breakpoint in the middle of a Tcl procedure, if executed with no argument.
-
The breakpoint for <proc-name> can be removed using the "undebug" command.
-
<proc-name> need not be a Tcl procedure. Setting a breakpoint on a built-in command is not for the faint-of-heart, however, as there are some commands used by the Tcl debugger itself. Setting a breakpoint on such a command will cause instant death.
See Also: undebug.
debugger
var debugger [<command-name>]
Name of the command when things go wrong. The function is passed two arguments: a condition and the current result string from the interpreter. The condition is "enter" if entering a command whose debug flag is set, "exit" if returning from a frame whose debug flag is set, "error" if an error occurred and the "debugOnError" variable is non-zero, "quit" if quit (^ is typed and the "debugOnReset" variable is non-zero, or "other" for some other cause (e.g. "debug" being invoked from within a function).
debugOnError
var debugOnError [(0|1)]
Examples:
-
"var debugOnError 1"
-
Turn on debugging when there's a Tcl error.
Enter debug mode when Swat encounters a Tcl error.
-
The 0|1 simply is a false|true to stop and debug upon encountering an error in a Tcl command.
-
If an error is caught with the catch command, Swat will not enter debug mode.
See Also: debugger.
defcmd
defcmd <name> <args> <help-class> <help-string> <body>
Examples: Look at almost any .tcl file in the system library for an example; a complete example set would be too large to give here.
This creates a new Tcl procedure with on-line help whose name the user may abbreviate when invoking.
-
<help-class> is a Tcl list of places in which to store the <help-string>, with the levels in the help tree separated by periods. The leaf node for each path is added by this command and is <name>, so a command "foo" with the <help-class> "prog.tcl" would have its <help-string> stored as "prog.tcl.foo."
-
Because the name you choose for a procedure defined in this manner can have an impact on the unique abbreviation for another command, you should use this sparingly.
See Also: defcommand,
proc,
help.
defcommand
defcommand <name> <args> <help-class> <help-string> <body>
Examples: Look at almost any .tcl file in the system library for an example.
This creates a new Tcl procedure with on-line help whose name must be given exactly when the user wishes to invoke it.
<help-class> is a Tcl list of places in which to store the <help-string>, with the levels in the help tree separated by periods. The leaf node for each path is added by this command and is <name>, so a command "foo" with the <help-class> "prog.tcl" would have its <help-string> stored as "prog.tcl.foo."
See Also: defcmd,
proc,
help.
defhelp
defhelp <topic> <help-class> <help-string>
Examples:
-
"defhelp breakpoint top {Commands relating to the setting of breakpoints}"
-
Sets the help for "breakpoint" in the "top" category to the given string.
This is used to define the help string for an internal node of the help tree (a node that is used in the path for some other real topic, such as a command or a variable).
-
This cannot override a string that resides in the
/pcgeos/tcl/doc
file.
-
You only really need this if you have defined your own help-topic category.
-
<help-class> is a Tcl list of places in which to store the <help-string>, with the levels in the help tree separated by periods. The leaf node for each path is added by this command and is <name>, so a command "foo" with the <help-class> "prog.tcl" would have its <help-string> stored as "prog.tcl.foo."
See Also: help.
defvar
defvar <name> <value> [<help-class> <help-string>]
Examples:
-
"defvar printRegions 0"
-
Define "printRegions" as a global variable and give it the value zero, if it didn't have a value already.
This command is used in .tcl files to define a global variable and give it an initial value, should the variable not have been defined before.
-
If the variable is one the user may want to change, give it on-line help using the <help-class> and <help-string> arguments.
-
<help-class> is a Tcl list of places in which to store the <help-string>, with the levels in the help tree separated by periods. The leaf node for each path is added by this command and is <name>, so a command "foo" with the <help-class> "variable.output" would have its <help-string> stored as "variable.output.foo."
See Also: var,
help.
|
GEOS SDK TechDocs
|
|
dbrk ...
|
delassoc ...