Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Next Free Block Pointer
Message
 
 
À
20/09/2001 04:13:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00558633
Message ID:
00559790
Vues:
11
This message has been marked as the solution to the initial question of the thread.
See comments below:

>I was testing out FIXFPT to see how it would handle certain corrupt memo files I have. I found that FIXFPT would detect a bad memo pointer on memo files which had no apparent problem. It consistently found the pointer, calculated from the header file, to be 1 less than what FIXFPT calculated it should be.

Is it fptfix file#18 from download section?

>Looking at the code it determines that the next free block pointer should be:
NextFreeBlockPt = INT((MemoFileSize/BlockSize)+1)
>Is this correct?


No it's not correct and it's actually the same as
NextFreeBlockPt = INT(MemoFileSize/BlockSize)+1
>Or should the correct pointer be just:>
INT(MemoFileSize/BlockSize) 
>or
CEILING(MemoFileSize/BlockSize)
Eaither one should return correct result because there's always whole number of memo blocks in a file. I would go with the second expression, just to be safe.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform