new-key-set.tcl

来自「可以在ns-2中进行仿真的SPIN路由协议的源码」· TCL 代码 · 共 27 行

TCL
27
字号
Set/KeySet instproc copy {args} {    # this will work even if this    # function is called by a subclass    set cl [$self info class]    if {[llength $args] == 0} {	set name [new $cl]    } else {	set name [lindex $args 0]	$cl $name    }    $name addlist [$self settolist]    return $name}Set/KeySet instproc addlist {elements} {    foreach el $elements {	if {[llength $el] > 1} {	    $self add [lindex $el 0] [lindex $el 1]	} else	{	    $self add $el	}    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?