\(\text{FileWriteByte}\)

You can use the \(\text{FileWriteByte}\) function to write a single byte to a file.

You can use the \filewritebyte backslash command to insert this function.

The following variants of this function are available:

  • \(\text{boolean } \text{FileWriteByte} \left ( \text{<file number>}, \text{<byte value>} \right )\)

The \(\text{<file number>}\) parameter is an integer value returned by the \(\text{FileOpenWrite}\) or \(\text{FileOpenWriteTruncate}\) functions. The \(\text{<byte value>}\) parameter holds the byte value to be written.

Note that the byte value must be an integer value over the range \([ 0, 255 ]\).

The \(\text{FileWriteByte}\) function returns true on success or false on failure.

The Figure 135 shows how you can use the \(\text{FileWriteByte}\) function.