Bset » History » Revision 2

Revision 1 (Per Amundsen, 02/08/2014 11:58 PM) → Revision 2/11 (Per Amundsen, 08/09/2015 05:49 AM)

_Added in 1.9.0_ 

 */bset [-t] <&binvar> <N> <asciivalue> [asciivalue ... asciivalue]* 

 Sets the <N>th byte in binary variable &binvar to the specified ascii value. 

 If the &binvar docent exists it is created. 
 If <N> is larger than the size of &binvar it will be zero filled up to <N> bytes. 
 If you specify multiple "ASCII": values, asciivalues, they are copied to successive positions after byte position N. 


 -t - Treat values a plain text. 


 <&binvar> - The &binvar to modify. 
 <N> - The byte to modify. 
 <asciivalue> - The "ASCII": ascii value to insert. 


 alias example { 
   ; Create ;Create a binary variable set it to "This is fun!" 
   bset -t &Example 1 This is fun! 
   ; Print ;Print out the content of the variable 
   echo -a $bvar(&Example, 1-).text