FILEBIN_READ()

FILEBIN_READ(N)

RETURNS ONE BYTE READ FROM THE BINARY FILE NUMBER N

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

ACTION

The command FILEBIN_READ(N) returns one byte (from 0 to 255) read from the binary file number N.

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

SYNTAX: Result=FILEBIN_READ(N)

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

USE

  • The fonction FILEBIN_READ() is used to read one byte from 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.

EXAMPLE

dim v%

rem open a file for reading

filebin_open_read 1,"test"

rem read the fourth byte

filebin_position 1,3

filebin_read 1,v%

rem print the read value

print v%

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_SIZE()

FILEBIN_WRITE