Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading and writing data, blocks, locks, etc
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00693459
Message ID:
00693552
Vues:
16
[Subtitle : EOF markers]

Jim wrote :
>The relevance of an "EOF MARKER" for VFP is unknown to me. In some cases I read that there seems to be one and that it matters a lot yet in other instances a situation is described where one seems to be irrelevant. It appears that VFP could get along nicely without such a marker.
>

There is one. It's 1Ah or CHR(26). Obviously it's maintained at the end of the file.

Some tests show that VFP is not bothered by or it not being there at all, or having it in several times.
Please note that I know of some previous Fox version (might even be FoxBase) that was bothered by the EOF marker in the middle of the file. But, I am not sure anymore about this.

Please never draw the conclusion that you are allowed to remove it at the end of the file (by means of some manual - or low level manipulation). For example, removing it at the end of the file, urges for some other character to be there, because otherwise the offset won't be right (at appending a new record).

Also note that although VFP finds it alright to have a CHR(26) in the middle of the file, hence CHR(26) can be used as data, it is strongly advised not do that. The EOF marker is a generally accepted phenomenon, at which much other software anticipates. For example, the normal Dos TYPE command, won't show the file behind the EOF marker.

From the theoretical point of view, the EOF marker is already necessary in order to officially indicate the end of the data in the file, as it will end within the last logical block belonging to the file. With respect to this, one will observe that the file length is usually (!) determined by the number of logical blocks occupied, and that the data-length within the file is determined by the number of blocks occupied minus 1, added with the bytes in the last block up till the EOF marker.

Peter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform