482
Platforms
©2000-2008 Tibbo Technology Inc.
size becomes empty, the pointer will be set to zero. If the new file size is not zero,
but the new size makes current pointer position invalid (that is, fd.pointer >
fd.f1) then the pointer will be set to fd.f1.
All possible status codes returned by this method are "generic" and are not
described here.
.Setpointer Method
Function:
Sets the new pointer position for a file opened "on" a
currently selected file number (selection is made through
the
).
Syntax:
fd.setpointer(pos as dword) as pl_fd_status_codes
Returns:
One of the following
, also affects
:
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
,
Par
t
Description
pos
Desired new pointer position. Supplied value will be corrected if out of
range.
Details
For the files of 0 size (see
), the pointer may only have one value -- 0.
If the file has non-zero size, the pointer can be between 1 and fd.f1. "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.f1" is the position at which
new data can be added to the file.
Invoking
moves the pointer forward automatically by
the number of bytes that were read from or written to the file.
Reducing the file size through the
may affect the pointer position.
If the file becomes empty, the pointer will be set to 0. If the new file size is not
zero, but its new size makes current pointer position invalid (that is, fd.pointer >
fd.f1) then the pointer will be set to fd.f1.
Current pointer position can be obtained through the
R/O property.
All possible status codes returned by this method are "generic" and are not
described here.
463
472
472
444
478
464
469
480
481
476