GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

get_binary: returns the binary internal representation of the objarray. Useful to avoid conversion from string or to string, or, for instance, to change from integer to chars.

objarray get_binary <obj>

e.g.

set obj [objarray new intarray -values {5 6 7 8}] 
-> 5 6 7 8 
puts [binary encode base64 [objarray get_binary $obj]] 
-> BQAAAAYAAAAHAAAACAAAAA== 
set obj2 [objarray new intarray -binary [objarray get_binary $obj]] 
-> 5 6 7 8 
set obj3 [objarray new chararray -binary [objarray get_binary $obj]] 
-> 5 0 0 0 6 0 0 0 7 0 0 0 8 0 0 0
  • No labels