Seek() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the current file position.

Syntax

Seek( filenum )

filenum is the number of an open file.

Return Value

LargeInt value

Description

The Seek() function returns MapBasic's current position in an open file.

The filenum parameter represents the number of an open file; this is the same number specified in the As clause of the Open File statement.

The integer value returned by the Seek() function represents a file position. If the file was opened in random-access mode, Seek() returns a record number (the next record to be read or written). If the file was opened in binary mode, Seek() returns the byte position of the next byte to be read from or written to the file.

Error Conditions

ERR_FILEMGR_NOTOPEN (366) error is generated if the specified file is not open.

See Also:

Get statement, Open File statement, Put statement, Seek statement