Eof
Eof() --> lRetChecks whether navigation reached the end boundary.
Overview
Eof returns a logical flag for the current alias. DBGoBottom positions on the last record but does not set EOF; moving past it can. An empty table already has true EOF. The example qualifies owned test table EDTRB, already open without pending changes, and only reports current state. EOF is not a record count, and fields must not be read when it is true. (TOTVS, n.d., ref. 1)
Syntax
Eof() --> lRetReturn value
Logical: true at the end boundary or on an empty table.
Commented example
#Include "Protheus.ch"
User Function Ed364()
// EDTRB is an already-open owned test table.
If Select("EDTRB") > 0
ConOut(cValToChar(EDTRB->(Eof())))
EndIf
Return NilState depends on position and data; no additional movement. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Qualify and verify the alias before querying.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.