EOF() 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 TRUE if MapBasic tried to read past the end of a file, FALSE otherwise.

Syntax

EOF( filenum )

filenum is the number of a file opened through the Open File statement.

Return Value

Logical

Description

The EOF() function returns a logical value indicating whether the End-Of-File condition exists for the specified file. The integer filenum parameter represents the number of an open file.

If a Get statement tries to read past the end of the specified file, the EOF() function returns a value of TRUE; otherwise, EOF() returns a value of FALSE.

The EOF() function works with open files; when you wish to check the current position of an open table, use the EOT() function.

For an example of calling EOF(), see the sample program NVIEWS.MB (Named Views).

Error Conditions

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

See Also:

EOT() function, Open File statement