SetByte PowerScript function
Description
Sets data of type Byte for a blob variable.
Syntax
|
1 |
<span>SetByte</span> ( <span>blobvariable</span>, <span>n</span>, <span>b</span>) |
|
Argument |
Description |
|---|---|
|
blobvariable |
A variable of the Blob datatype |
|
n |
Tthe number of the position in blobvariable at |
|
b |
Data of the Byte datatype |
Return Values
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.
Examples
This example adds the byte equivalent of 37 at the
initial position of the emp_photo blob. If no byte is assigned
to the second position, the blob displays as the ASCII equivalent
of 37 (the percent character, %) in the second message box:
|
1 |
blob {100} emp_photo |
|
1 |
byte b1 = byte (37) |
|
1 |
int li_rtn |
|
1 |
li_rtn = <span>SetByte</span>(emp_photo, 1, b1) |
|
1 |
messagebox("setbyte", string(b1)) |
|
1 |
messagebox("setbyte", string(emp_photo)) |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest