Re: strange tcl behavior



IonutAnghelcovici wrote:
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".

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

Can somebody help me understand why the value of test_var is changed
to cusom_alias ?

It's hard to be sure, but the results suggest that the [defobj]
command may not be properly respecting the Copy-On-Write rules for
modifying Tcl values.

Is the implementation of [defobj] available for review?

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.