Sfairadora

  • Reference Guide

set_pos

f <- set_pos(pos)
f <- set_pos(pos, org)
The parameter f is a variable of the type File. The function sets the current position of the file pointer according to the pos parameter (of the type Int). If the org parameter (of the type Byte) is specified, it determines the position relative to which the pointer is to be moved. It can be one of the following constants:
Constant
Description
FILE_BEGIN
The position is specified relative to the file beginning. The pos parameter must be always positive or zero. The zero value sets the pointer to the file beginning.
FILE_CURRENT
The position is specified relative to the current file pointer position. Positive values move the file pointer forward; negative values move it backwards. Zero leaves the pointer unchanged.
FILE_END
The position is specified relative to the end of the file. Negative values set the file pointer the specified number of bytes before the end of file. Positive values move the file pointer beyond the end of file. Zero sets the file pointer immediately next to the last byte of the file.
If the org parameter is not specified, the FILE_BEGIN constant is assumed.

Return Value

An l-value referring to the variable f is returned. If an error occurs, an Error value is returned.

See Also