$bvar » History » Version 3
Per Amundsen, 08/09/2015 06:07 AM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$bvar(&binvar,N,M)* |
||
4 | |||
5 | 2 | Per Amundsen | Returns M "ASCII":http://www.asciitable.com/ values from a &binvar starting from the Nth byte. |
6 | 1 | Per Amundsen | |
7 | *Parameters* |
||
8 | |||
9 | &binvar - The &binvar to use. |
||
10 | N - Position to start retrieving bytes. |
||
11 | M - Numbers of bytes to get. |
||
12 | |||
13 | *Properties* |
||
14 | |||
15 | 2 | Per Amundsen | .text - Returns plain text instead of "ASCII":http://www.asciitable.com/ values. |
16 | 1 | Per Amundsen | .word - TODO |
17 | .nword - TODO |
||
18 | .long - TODO |
||
19 | .nlong - TODO |
||
20 | |||
21 | *Example* |
||
22 | |||
23 | <pre> |
||
24 | 3 | Per Amundsen | ; Returns the length of the binary variable. |
25 | 1 | Per Amundsen | //echo -ag $bvar(&binvar,0) |
26 | |||
27 | 3 | Per Amundsen | ; Returns ascii value at position N. |
28 | 1 | Per Amundsen | //echo -ag $bvar(&binvar,1) |
29 | |||
30 | 3 | Per Amundsen | ; Returns ascii values from 5 to 8. |
31 | 1 | Per Amundsen | //echo -ag $bvar(&binvar,5,3) |
32 | |||
33 | 3 | Per Amundsen | ; Returns plain text from 5 to 8 up to the first zero character. |
34 | 1 | Per Amundsen | //echo -ag $bvar(&binvar,5,3).text |
35 | </pre> |