FILEBIN_POS()

FILEBIN_POS(N)

RETURNS THE CURRENT POSITION IN THE BINARY FILE NUMBER N

  • Type: Function
  • Parameter: 1
  • Group: Binary Files

ACTION

The fonction FILEBIN_POS(N) returns the current position in the binary file number N, that is the position of the next byte to be read or to be written. The first position in a binary file is 0.

SYNTAX: Result=FILEBIN_POS(N)

  • 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.

USE

  • The function FILEBIN_POS() is used to know the current position in 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.

EXAMPLE

rem open a binary file for reading

filebin_open_read 1,"test"

rem print the current position

print filebin_pos(1)

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_POSITION

FILEBIN_READ

FILEBIN_READ()

FILEBIN_SIZE()

FILEBIN_WRITE