Skip to content
Snippets Groups Projects
Commit 0f774f51 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix contributed by Brian. The general idea is to allow global

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.
parent 8a29d3c4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment