Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EOF() and BOF() - kinda..
Message
From
06/10/1998 22:17:38
 
 
To
06/10/1998 16:58:59
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00144378
Message ID:
00144433
Views:
19
>Is there an easier way to detect if the record pointer is at the first or last record than EOF and BOF (which require I SKIP past them, causing problems).
>
>there has to be something better that what I have - something like :
>
>PROCEDURE myEOF
>LOCAL llRet
>
>IF .NOT. EOF()
> SKIP
> llRet = EOF()
> SKIP -1
>ELSE
> llRet = .T.
>ENDIF
>
>RETURN llRet
>
>Tim


IF RECCOUNT() > 0
lnCurrRec = RECNO()
GO TOP
lnTopRec = RECNO()
GO BOTTOM
lnBottomRec = RECNO()

DO CASE
CASE lnCurrRec = lnTopRec
WAIT WINDOW "At Top Record"
CASE lnCurrRec = lnBottomRec
WAIT WINDOW "At Bottom Record"
OTHERWISE
WAIT WINDOW "Someplace in the middle
ENDCASE
ENDIF
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform