Project

General

Profile

$bvar » History » Revision 10

Revision 9 (Per Amundsen, 01/05/2019 12:19 PM) → Revision 10/13 (Per Amundsen, 01/05/2019 12:20 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 - Outputs decimal value of a 2-byte word, seeing bytes in little-endian byte order (low value first, (unsigned 16 bit) 
 .nword - Outputs decimal value of a 2-byte word, seeing bytes in big-endian byte order (high value first, unsigned 16 bit) 
 .sword .long - Outputs decimal value of a 2-byte word, 4-byte dword (unsigned long), seeing bytes in little-endian byte order (low value first, signed 16 bit, AdiIRC only) unsigned 32 bit) 
 .nsword .nlong - Outputs decimal value of a 2-byte word, 4-byte dword (unsigned long), seeing bytes in big-endian byte order (high value first, signed 16 bit, AdiIRC only) 

 .long first. unsigned 32 bit) 
 .sword - Outputs decimal value of a 4-byte dword (unsigned long), 2-byte word, seeing bytes in little-endian byte order (low value first, unsigned 32 bit) signed 16 bit, AdiIRC only) 
 .nlong .nsword - Outputs decimal value of a 4-byte dword (unsigned long), 2-byte word, seeing bytes in big-endian byte order (high value first. unsigned 32 bit) first, signed 16 bit, AdiIRC only) 
 .slong - Outputs decimal value of a 4-byte dword (unsigned long), seeing bytes in little-endian byte order (low value first, signed 32 bit, AdiIRC only) 
 .nslong - Outputs decimal value of a 4-byte dword (unsigned long), seeing bytes in big-endian byte order (high value first. signed 32 bit AdiIRC only) 

 
 .uint64 - Outputs decimal value of a 8-byte dword (unsigned long), seeing bytes in little-endian byte order (low value first, unsigned 64 bit AdiIRC only) 
 .nuint64 - Outputs decimal value of a 4-byte dword (unsigned long), seeing bytes in big-endian byte order (high value first. unsigned 64 bit AdiIRC only) 
 .sint64 - Outputs decimal value of a 4-byte dword (unsigned long), seeing bytes in little-endian byte order (low value first, signed 64 bit, AdiIRC only) 
 .nsint64 - Outputs decimal value of a 4-byte dword (unsigned long), seeing bytes in big-endian byte order (high value first. signed 64 bit AdiIRC only) 

 *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>