Project

General

Profile

$bvar » History » Revision 6

Revision 5 (Per Amundsen, 05/31/2016 08:35 PM) → Revision 6/13 (Per Amundsen, 02/25/2017 04:09 PM)

_Added in 1.9.0_ 

 *$bvar(&binvar,N,M)* 

 Returns M "ASCII":http://www.asciitable.com/ values from a &binvar starting from the Nth byte. 

 _N-N2 can be used to get a range of ASCII values._ 
 _N- can be used to get all ASCII values from position N._ 

 *Parameters* 

 &binvar - The &binvar to use. 
 N - Position to start retrieving bytes. 
 M - Numbers of bytes to get. 

 *Properties* 

 .text - Returns plain text instead of "ASCII":http://www.asciitable.com/ values. 
 .word - TODO 
 .nword - TODO 
 .long - TODO 
 .nlong - TODO 

 *Example* 

 <pre> 
 ; Returns the length of the binary variable. 
 //echo -ag $bvar(&binvar,0)         

 ; Returns ASCII value at position N. 
 //echo -ag $bvar(&binvar,1) 

 ; Returns ASCII values from 5 to 8. 
 //echo -ag $bvar(&binvar,5,3) 

 ; Returns ASCII values from 5 to end. 
 //echo -ag $bvar(&binvar,5-) 

    

 ; Returns plain text from 5 to 8 up to the first zero character. 
 //echo -ag $bvar(&binvar,5,3).text 

 ; Returns &binvar if the binvar exists. 
 //echo -ag $bvar(&binvar) 
 </pre>