FILEBIN_HEXA_WRITE

FILEBIN_HEXA_WRITE N,C,S

WRITES C BYTES TO THE BINARY FILE NUMBER N, DATA TO BE WRITTEN ARE IN THE STRING EXPRESSION S

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

ACTION

The command FILEBIN_HEXA_WRITE N,C,S writes a block of C bytes to the binary file number N, data to be written are in the string expression S.

The size the string expression S must be greater than or equal to 2xC.

The current position in the binary file is increased by C.

SYNTAX: FILEBIN_HEXA_WRITE N,C,S

  • 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.
  • C = bytes number, of type integer or real.
  • S = name of string variable, or string expression.

USE

  • The command FILEBIN_HEXA_WRITE is used to write a block of bytes 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 C is not a correct expression.
  • If C is less than 1.
  • If S is not a correct expression.
  • If the size of the string expression S is not greater than or equal to 2xC.

EXAMPLE

rem open a binary file for writing

filebin_open_write 1 1,"file.abc"

rem set the position to 5

filebin_position 1,5

rem write 10 bytes

filebin_hexa_write 1,10,"1A2B3C4D5E6F00112233"

rem close the binary file

filebin_close 1

SEE ALSO

FILEBIN_BLOCK_READ

FILEBIN_BLOCK_WRITE

FILEBIN_CLOSE

FILEBIN_HEXA_READ

FILEBIN_HEXA_READ$()

FILEBIN_OPEN_READ

FILEBIN_OPEN_WRITE

FILEBIN_POS()

FILEBIN_POSITION

FILEBIN_READ

FILEBIN_READ()

FILEBIN_SIZE()

FILEBIN_WRITE