objarray new <type> (-values {<value_1> ... <value_n>}) | (<size> ?<fill_value>?) | (-binary <data>)
e.g.
Code Block |
---|
set obj [objarray new intarray 3]
-> 1518360 1518610 0 (3 random unitialized values)
set obj [objarray new intarray 5 1]
-> 1 1 1 1 1 (5 values intialized to 1)
set obj [objarray new intarray -values {6 3 8}]
-> 6 3 8
set obj [ objarray new intarray -binary [ binary decode base64 AQAAAAIAAAADAAAABAAAAA==]]
-> 1 2 3 4
set obj2 [ objarray new intarray -binary [ objarray get_binary $obj]]
-> 1 2 3 4 |