Przemek, Thank you very much for your reply.
What is the others developer's idea on this? Keep it strict Clipper compatible or change current EOF behaviour? Patrick On Feb 12, 2008 12:10 PM, Przemyslaw Czerpak <[EMAIL PROTECTED]> wrote: > > On Tue, 12 Feb 2008, Patrick Mast wrote: > > Hello Przemek, > > Did you receive my private mail regarding "Eof == .T. on Phantom record"? > > Thanks! > > It's normal Clipper behavior replicated in [x]Harbour: > proc main(rdd) > rddSetDefault(iif(empty(rdd),"DBFCDX",rdd)) > ? rddSetDefault() > dbCreate("_tst",{{"F1","C",1,0}}) > use _tst > ? bof(), eof(), lastrec(), recno() > dbSkip(-1) > ? bof(), eof(), lastrec(), recno() > return > > In the above code we are at phantom record but after dbSkip(-1) > the EOF flag is cleared. In such way work all CL52, SIX3 and CL53 > RDDs. Also [x]Harbuor's DBF, DBFCDX, DBFNTX. Only our ADS RDD > do not always respect it (f.e. in this example) and this is side > effect of code which hides top phantom record. > I said many times in the past that EOF() checking to detect > phantom record is not enough even in standard Clipper RDDs. > Additionally some RDDs may not support phantom records at > all or can have both: top and bottom ones, f.e. ADS has both > (see above) though we are hiding this in our code. I suggested > to introduce new function like isPahntomRec() to detect such > situation. Of course we can also change current code to not > be Clipper compatible. It will be enough to change the > condition which exists at the end of SKIP methods: > > /* Update Bof and Eof flags */ > if( fForward ) > pArea->fBof = FALSE; > else > pArea->fEof = FALSE; > > and update only fBof flag but it may introduce some other problems > for code which strictly need Clipper compatibility though I do not > think if many people knows how exactly this flag are updated by Clipper. > > best regards, > Przemek > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour