SetByte
PowerScript function
Description
Sets data of type Byte for a blob variable.
Syntax
1 |
SetByte ( blobvariable, n, b) |
Argument |
Description |
---|---|
blobvariable |
A variable of the Blob datatype in which you want to |
n |
The number of the position in blobvariable at which you |
b |
Data of the Byte datatype that you want to set into |
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.
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 2 3 4 5 6 |
blob {100} emp_photo byte b1 = byte (37) int li_rtn li_rtn = SetByte(emp_photo, 1, b1) messagebox("setbyte", string(b1)) messagebox("setbyte", string(emp_photo)) |
See also