Project

General

Profile

$bvar » History » Version 5

Per Amundsen, 05/31/2016 08:35 PM

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 4 Per Amundsen
; Returns ASCII value at position N.
28 1 Per Amundsen
//echo -ag $bvar(&binvar,1)
29
30 4 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 5 Per Amundsen
36
; Returns &binvar if the binvar exists.
37
//echo -ag $bvar(&binvar)
38 1 Per Amundsen
</pre>