📄 test-meta.tcl
字号:
#!/home/jokulik/ns/monarch/ns-src/nssource /homes/wendi/temp/meta/ns-key-meta.tclsource /homes/wendi/temp/meta/new-key-set.tclset seta [new Set/KeySet]set setb [new Set/KeySet]$seta pp $setb ppputs "Add test"$seta add "a"$seta pp "Set a"puts "Set b is"$setb pp $seta addlist [list "a" "b" "c"] puts "Set a is" $seta pp puts "Set b is" $setb pp $setb addlist [list "c" "d" "a"] puts "Set a is" $seta pp puts "Set b is" $setb pp puts "Union test" puts "Union of set a and b is" $seta union $setb$seta pp "Union" puts "Set a is" $seta pp puts "Set b is" $setb pp puts "Intersection test" puts "Set a is" $seta pp puts "Set b is" $setb pp puts "Intersection of set a and b." $seta intersection $setb puts "Set a is" $seta pp puts "Copy test" $setb copy setc puts "Set a is" $seta pp puts "Set b is" $setb pp puts "Set c is" setc ppputs "Test of variables" puts "This is a" $seta pp puts "Adding w to a" $seta add "w" puts "Copy test 2" set baz [$seta copy] puts "Set a is" $seta pp puts "Copy of $seta is" $baz pp puts "Subtraction test" puts "Set a is" $seta pp puts "Set b is" $setb pp puts "Subtraction of set be from set a." $seta subtract $setb puts "Set a is" $seta ppset setb [new KeyMetaData]$setb pp "B"$setb add "alls"$setb add "well"$setb add "that"set foo [new Set/KeySet]$foo add "a" "1"$foo add "b"$foo ppset l [$foo settolist]set b [lindex $l 0]set c [lindex $b 0]puts "The list is $l, $b, $c"set baz [new Set/KeySet]set l [$baz settolist]$baz pp "Baz"puts "The list for baz is $l"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -