Setting the value of a specified byteΒΆ

setbyte()

Set the value of a specified byte


SYNTAX

setbyte(field_id, position, value)

Store a value into a byte. The function is designed to set an individual byte in a user defined or binary data type. The related getbyte() function allows individual bytes to be retrieved.

field_id

The identifier of the field.

position

The position of the byte in the field. The first byte counts as 1.

value

The value to be stored. It should be an integer within the range 0-255.

This function returns a null value.


EXAMPLE

Store the value 200 in the last byte of a binary string:

!temp String,,b255
     setbyte(tmp.String, 255, 200)