Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty record for simple NEXT click method
Message
From
06/03/2003 05:41:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/03/2003 20:53:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00760254
Message ID:
00762039
Views:
26
>EOF() and BOF() return .T. whenever you try to move *beyond* the end or beginning of the file (depending on the direction). So if you're on the last record, you won't get EOF() until you attempt to SKIP -- leaving you at a "phantom" record at RECCOUNT()+1. Likewise, if you're on the first record, you won't get a BOF() until you try SKIP -1 -- though in this case you're still on RECNO()=1. EOF() does give you what you might expect when the table is empty (it returns .T.).

Yes, I know. All this is a little confusing to the beginner, especially the inconsistency between BOF() and EOF().
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform