|
|
|
package require punk
|
|
|
|
|
|
|
|
a= {a b c d e f}
|
|
|
|
puts stdout "scriptline: a= {a b c d e f}"
|
|
|
|
puts stdout "a: $a"
|
|
|
|
|
|
|
|
b@end= {a b c d e f}
|
|
|
|
puts stdout "scriptline: b@end= {a b c d e f}"
|
|
|
|
puts stdout "b: $b"
|
|
|
|
|
|
|
|
|
|
|
|
c@1-3= {a b c d e f}
|
|
|
|
puts stdout "scriptline: c@1-3= {a b c d e f}"
|
|
|
|
puts stdout "c: $c"
|
|
|
|
|
|
|
|
d@end-3-end-1= {a b c d e f}
|
|
|
|
puts stdout "scriptline: d@end-3-end-1= {a b c d e f}"
|
|
|
|
puts stdout "d: $d"
|
|
|
|
|
|
|
|
set dict {key0 000 key1 111 key2 222 key3 333 key4 444}
|
|
|
|
pipeset pipeline .= e@@key1,f@@key3,g= $dict
|
|
|
|
puts stdout "pipeline: $pipeline"
|
|
|
|
#as pipeline is a list - we need to run with eval or {*} - review - alias?
|
|
|
|
#$pipeline
|
|
|
|
{*}$pipeline
|
|
|
|
puts stdout "e: $e"
|
|
|
|
punk::assert {$e eq 111}
|
|
|
|
puts stdout "f: $f"
|
|
|
|
punk::assert {$f eq 333}
|
|
|
|
puts stdout "g: $g"
|
|
|
|
punk::assert {[llength $g] eq [llength $dict]}
|
|
|
|
|
|
|
|
|
|
|
|
result,arr(a,2)@@key2,arr(a,4)@@key4= $dict
|
|
|
|
puts stdout "scriptline: result,arr(a,2)@key2,arr(a,4)@key4= {key0 000 key1 111 key2 222 key3 333 key4 444}"
|
|
|
|
if {[info commands pdict] ne ""} {
|
|
|
|
puts stdout "pdict arr :"
|
|
|
|
pdict arr
|
|
|
|
} else {
|
|
|
|
puts stdout "parray arr :"
|
|
|
|
parray arr
|
|
|
|
}
|
|
|
|
puts stdout "result:$result"
|
|
|
|
|
|
|
|
|
|
|
|
puts stdout "-done-"
|