[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FSEEK()
FSEEK() sets the file pointer to a new position in a file.
Syntax
FSEEK(<expN1>,<expN2>[,<expN3>])
Argument
<expN1> is the file handle obtained from FOPEN(), FCREATE(), or
predefined by DOS.
<expN2> is the number of bytes to move the file pointer from the
position as defined by <expN3>. This can be a positive or negative
number depending on the direction to move the pointer.
<expN3> defines the method of moving and is indicated by a value from
the following list:
Methods of Moving the DOS File Pointer
Method Description
0 Beginning-of-file
1 Current pointer position
2 End-of-file
The default method is zero.
Returns
A numeric value.
FSEEK() returns the new position of the file pointer relative to the
beginning-of-file.
Example
handle = FOPEN("Temp.txt"
*
* Get length of the file.
length = FSEEK(handle, 0, 2)
*
* Reset file position.
FSEEK(handle, 0)
WARNING: This function allows low level access to DOS files & devices.
They should be used with extreme care and require a thorough
knowledge of the operating system.
See Also:
FCLOSE
FCREATE
FERROR
FOPEN
FREAD
FREADSTR
FWRITE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson