FILEBIN_WRITE

FILEBIN_WRITE N,E

WRITES ONE BYTE E TO THE BINARY FILE NUMBER N

  • Type: Command
  • Parameters: 2
  • Group: Binary Files

ACTION

The command FILEBIN_WRITE N,E writes one byte to the binary file number N, the byte being in the variable E, or the result of the arithmetic expression E.

The current position in the binary file is incremented by 1.

Example :

filebin_write 1,Ab3%(6) (variable belonging to an integer array)

filebin_write 1,A+3 (arithmetic expression)

SYNTAX: FILEBIN_WRITE N,E

  • N = binary file number (integer or real). Must be greater than 0 and less than or equal to the maximum of allowed binary file number.
  • E = variable name, or arithmetic expression.

USE

  • The command FILEBIN_WRITE is used to write one byte to a binary file.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the maximum of allowed binary file number.
  • If number N is not used for an open binary file.
  • If E is not a correct expression.
  • If E is not a declared variable.
  • If the value of E is not between 0 and 255.

EXAMPLE

rem open a binary file for writing

filebin_open_write 1,"test"

rem write the value 40

filebin_write 1,40

rem close the file

filebin_close 1

SEE ALSO

FILEBIN_BLOCK_READ

FILEBIN_BLOCK_WRITE

FILEBIN_CLOSE

FILEBIN_HEXA_READ

FILEBIN_HEXA_READ$()

FILEBIN_HEXA_WRITE

FILEBIN_OPEN_READ

FILEBIN_OPEN_WRITE

FILEBIN_POS()

FILEBIN_POSITION

FILEBIN_READ

FILEBIN_READ()

FILEBIN_SIZE()