upvar

parameter in and out

% proc aa { href } {
upvar $href localhref;
set localhref 1;

}
% aa test
1
% puts $test
1

原文地址:https://www.cnblogs.com/greencolor/p/4006827.html