EOF( ) Function

Example   See Also

Determines whether the record pointer is positioned past the last record in the current or specified table.

Syntax

EOF([nWorkArea | cTableAlias])

Returns

Logical

Arguments

nWorkArea

Specifies the work area number of the table.

cTableAlias

Specifies the alias of the table.

EOF( ) returns false (.F.) if a table isn't open in the work area you specify.

If you do not specify a work area or alias, the table that is open in the currently selected work area is tested for the end of the table condition.

Remarks

EOF( ) returns true (.T.) if the record pointer reaches the end of the table file (EOF). The end of the table is reached when the record pointer passes the last record in the table. For example, when a FIND, LOCATE, or SEEK is unsuccessful, Visual FoxPro moves the record pointer past the last record, and EOF( ) returns true (.T.). EOF( ) returns false (.F.) if the record pointer isn't at the end of the table.