GetByte
PowerScript function
Description
Extracts data of type Byte from a blob variable.
Syntax
|
1 |
GetByte ( blobvariable, n, b ) |
|
Argument |
Description |
|---|---|
|
blobvariable |
A variable of the Blob datatype from which you want to |
|
n |
Tthe number of the position in blobvariable at which you |
|
b |
Variable of the Byte datatype in which you want to store |
Return value
Integer.
Returns 1 if it succeeds or -1 if n exceeds the scope of
blobvariable; it returns null if the value of any of its arguments is
null.
Usage
If you want to get the value of the initial character in a blob, you
can use the Byte function without using an argument defining the position
of the character.
Examples
This example converts the text in a SingleLineEdit to a blob before
obtaining the byte value of the character at the third position:
|
1 2 3 4 5 6 |
Int li_rtn Byte lb_byte Blob myBlob myBlob = Blob (sle_1.text, EncodingUTF8!) li_rtn = GetByte(myBlob, 3, lb_byte) messagebox("getbyte", string(lb_byte)) |
See also