• Leigh Stoller's avatar
    Fix contributed by Brian. The general idea is to allow global · 0f774f51
    Leigh Stoller authored
    variables to be renamed from within a subroutine:
    
    	proc create_testnet {} {
    		set s1 [$ns node]
     	}
    
    Chris' redefined set did not allow this. This is further complicated
    by the fact that its difficult to tell whats a global variable. You
    can declare a variable global, but until its set for the first time,
    the TCL info function will not tell you its a global. We do not want
    to rename locals of course, since that would make no sense to do.
    Anyway, Brian contributed the code to fix the new set function, and I
    looked at it and did my best to understand it (I kinda do), but no way
    I can be sure! I ran it through the test suite and spot checked the DB
    state. Seems to work okay.
    0f774f51
parse.tcl.in 10.1 KB