Seek (Function)

Gets the position of the next read/write operation for a file or device

Syntax
	KeyPgDeclareDeclare KeyPgFunctionFunction Seek ( KeyPgByvalByVal filenum KeyPgAsAs KeyPgLongLong ) KeyPgAsAs KeyPgLongintLongInt

Parameters
	filenum
		file number of an open file

Return Value
	The file position where the next read or write operation will take 
	place.

Description
	The position is given in records if the file was opened in KeyPgRandomRandom access 
	mode, in bytes in any other case. The file position returned is 1-based, 
	so the first record of a file is 1.

	The KeyPgSeeksetSeek statement is used to set the position of the next read or write 
	operation.

Example
	Dim f As Long, position As LongInt

	f = FreeFile
	Open "file.ext" For Binary As #f

	position = Seek(f)

	Close #f

Differences from QB
	* None

See also
	* KeyPgSeeksetSeek (Statement)
	* KeyPgLocLOC
	* KeyPgOpenOpen

