You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
967 B

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}
pipeline=.= e@@key1,f@@key3,g= $dict
puts stdout "pipeline: $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}"
puts stdout "parray arr :"
parray arr
puts stdout "result:$result"
puts stdout "-done-"