Wednesday 2 July 2014

Visual FoxPro Memo file format uses big-endian convention

Contrary to the little-endian convention used across DBF file format, and generally across the Windows, VFP Memo file format uses the big-endian one.

A screen shot below displays the header record of a memo file. The first four bytes define the location of next free block. Bytes 6 to 7 (0x00, 0x40) defines the size of a block -- 64 bytes, VFP default value (SET BLOCKSIZE). Clearly the big-endian convention is used.



In no way this is an obstacle had you decided to parse or modify Memo files, but of course needs to be taken into account.

As I found after completing this post, Visual FoxPro MSDN page states exactly the same: [for offset, length, and size fields in Memo File Structure (.FPT)Integers stored with the most significant byte first.

No comments:

Post a Comment