Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EOF() and BOF() - kinda..
Message
De
06/10/1998 22:17:38
 
 
À
06/10/1998 16:58:59
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00144378
Message ID:
00144433
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform