strange tcl behavior
- From: IonutAnghelcovici <anghelcovici@xxxxxxxxx>
- Date: Fri, 27 Jun 2008 02:01:36 -0700 (PDT)
Hello everybody!
I have a big problem with a TCL script. I will do my best to describe
the behavior:
I have a C program that defines some custom TCL commands. The program
parses an input TCL file.
When it starts the parsing the only custom command is defobj <name>
<alias>. What that command does is to create two new commands: "name"
and an alias to it called "alias".
The startup script does the following:
if { [info commands "custom_command"] == "" } {
source prim_script.tcl
}
The prim_script.tcl is:
set test_var custom_command
....
if { $test_var == "custom_command" } {
{
puts $test_var
defobj custom_command custom_alias
puts $test_var
}
......
When I run the script I get the following output:
custom_command
custom_alias
The crazy thing is that if I change the startup script to:
puts [info commands "custom_command"] == "" } {
source prim_script.tcl
}
Can somebody help me understand why the value of test_var is changed
to cusom_alias ?
Thank you,
Ionut Anghelcovici
.
- Follow-Ups:
- Re: strange tcl behavior
- From: Donald G Porter
- Re: strange tcl behavior
- Prev by Date: Re: Pipeline never becomes readable
- Next by Date: Re: timeout for "socket"?
- Previous by thread: Devanagari question
- Next by thread: Re: strange tcl behavior
- Index(es):
Relevant Pages
|