Topic group Related topics
Indicates if the record pointer in a table is at the beginning of the file.
The work area you want to check.
BOF( ) returns true when the record pointer has just moved before the first logical record of the table in the specified work area; otherwise, it returns false. For example, if you issue SKIP -1 when the record pointer is on the first record, BOF( ) returns true. If you attempt to navigate backwards when BOF( ) is true, an error occurs.
However, unlike EOF( ), the record pointer can never stay before the first record. After the record pointer has moved past the first record, it is automatically moved back to the first record, even though BOF( ) remains true. Subsequent navigation will cause BOF( ) to return false unless the navigation moves the record pointer before the first record again.
When you first USE a table, BOF( ) can never be true, but EOF( ) can if the table is empty, or you are using a conditional index with no matching records.
If no table is open in the specified work area, BOF( ) also returns false.
The Rowset object’s endOfSet property is true when the row pointer is past either end of the rowset. Unlike BOF( ) and EOF( ), there is symmetry with the endOfSet property. You can determine which end you’re on based on the direction of the last navigation.
There is also an atFirst( ) method that determines whether you are on the first row in the rowset.