Write Byte to Buffer Method
The Write Byte to Buffer method writes a byte to a buffer at a position that you specify.
Format
bufferVar[offset]
The following table describes the arguments for the Write Byte to Buffer method.
Argument | Description |
---|---|
offset |
A number that describes a position in the buffer that the bufferVar method identifies. This method does one of the following:
Note the following:
|
Usage
The Write Byte to Buffer method is an array-like version of the Get Cursor Position Value From Buffer method and the Put Value in Buffer method except that the Write Byte to Buffer method works only with bytes. You can write code that gets or sets these values. For example, the following code sets the goo variable to the value of a byte. This byte resides in the buffer at offset position 5:
goo = foo[5]
The following code sets the value of position 5 in the foo buffer to the value that the goo variable contains:
foo[5] = goo
This code assumes the value that the goo variable contains is a single byte value.
Every get or put operation uses eight-bit signed words (SWORD8). If you must work with character values, then you must convert these values to their ANSI equivalent or Unicode equivalent.
Related Topics
For more information, see the following topics: