Unexpected result from [slave alias srcCmd {}]
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Unexpected result from [slave alias srcCmd {}]

From: Erik Leunissen <look@the.footer.invalid>
Date: Mon May 30 2005 - 18:29:54 CEST

L.S.

I'm exercising aliases between master and slave interps. The following
gave an unexpected result, or I misunderstood something.

The unexpected part is that [slave alias srcCmd {}] should delete a
previously defined alias. What I find is that it deletes the command
itself in the slave interpreter. See below for a reproducible script.

Did I misunderstand the meaning of an alias, or is this a bug?

Greetings,

Erik Leunissen
==============

% interp create slave
slave
% proc putsFromMaster {txt} {
        puts "Master: $txt"
}
% slave alias puts putsFromMaster
puts
% slave eval puts foo
Master: foo
% puts [slave eval info commands p*]
pwd pid proc package puts
% slave alias puts {}
% slave eval puts foo
invalid command name "puts"
% puts [slave eval info commands p*]
pwd pid proc package

-- 
   leunissen@       nl | Merge the left part of these two lines into one,
e.          hccnet.   | respecting a character's position in a line.
Received on Thu Sep 29 14:19:41 2005