Purpose
Returns TRUE if MapBasic has reached the end of the specified table, FALSE otherwise. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
EOT( table )
table is the name of an open table.
Return Value
Logical
Description
The EOT() function returns TRUE or FALSE to indicate whether MapInfo Pro has tried to read past the end of the specified table. The table parameter represents the name of an open table.
Error Conditions
ERR_TABLE_NOT_FOUND (405) error generated if the specified table is not available
Example
The following example uses the logical result of the EOT() function to decide when to terminate a loop. The loop repeatedly fetches the next record in a table, until the point when the EOT() function indicates that the program has reached the end of the table.
Dim f_total As Float
Open Table "customer"
Fetch First From customer
Do While Not EOT(customer)
f_total = f_total + customer.order
Fetch Next From customer
Loop
See Also:
EOF() function, Fetch statement, Open File statement, Open Table statement