Vector
A vector
is a new datatype implemented in Blt that provides
compact arrays of vectors. A vector can also be loaded
to/from a Tree.
namespace eval ::myapp {
Mod export
vector create v1
v1 set {
1.0 2.0 3.0
4 5 6
}
proc Main {args} {
variable v1
v1 expr v1*2.5
set v1(5) [expr {$v1(5)+2}]
puts [v1 range 0 end]
}
eval Main $argv
}
© 2008 Peter MacDonald