.setpointer Method

Function:

Sets the new pointer position for a file opened "on" a currently selected file number (selection is made through fd.filenum).

Syntax:

fd.setpointer(pos as dword) as pl_fd_status_codes

Returns:

One of the following pl_fd_status_codes, also affects fd.laststatus:

0 — PL_FD_STATUS_OK: Completed successfully.

1 — PL_FD_STATUS_FAIL : Physical flash memory failure (fatal).

2 — PL_FD_STATUS_CHECKSUM_ERR: Checksum error has been detected in one of the disk sectors (fatal).

3 — PL_FD_STATUS_FORMAT_ERR: Disk formatting error has been detected (fatal).

8 — PL_FD_STATUS_NOT_READY: The disk is not mounted.

See Also:

Writing To and Reading From Files, fd.getdata, fd.setdata, fd.pointer, fd.filesize


Part

Description

pos

Desired new pointer position. The supplied value will be corrected if out of range. For the files of 0 size (see fd.filesize), the pointer may only have one value — 0. If the file has non-zero size, the pointer can be between 1 and fd.filesize + 1. "1" is the position of the first byte of the file. The last existing byte of the file is at position equal to the value of fd.filesize. "fd.filesize + 1" is the position at which new data can be added to the file.