Seek statement - 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

Sets the current file position, to prepare for the next file input/output operation.

Syntax

Seek [ # ] filenum, position 

filenum is a LargeInt value, indicating the number of an open file.

position is a LargeInt value, indicating the desired file position to read from.

Description

The Seek statement resets the current file position of an open file. File input/output operations which follow a Seek statement will read from (or write to) the location specified by the Seek.

If the file was opened in Random access mode, the position parameter specifies a record number.

If the file was opened in a sequential access mode, the position parameter specifies a specific byte position; a position value of one represents the very beginning of the file.

See Also:

Get statement, Input # statement, Open File statement, Print # statement, Put statement, Seek() function, Write # statement