>Thanks, I ended up using that code. But I have a question, my boss has said that binary storage depended upon the processor. Some store as LITTLE_ENDIAN, others store as BIG_ENDIAN. This function doesn't make a distinction based on different processors. I had always thought that all storage was LITTLE_ENDIAN.
Don't forget mixed-endian, follow the links for descriptions of X-endian:
http://info.astrian.net/jargon/terms/l/little-endian.htmlIntel x86 is little-endian, Motorola 68K (Apple Mac, etc.) is big-endian, Motorola/IBM PowerPC can run as either.
Integers in Foxpro file structures are little-endian, Integers in table columns are stored in the same format as bintoc() returns - a modified form of big-endian with the sign bit inverted. This modified big-endian format is used because you can collate (index) this format as though they are 4 byte character strings (no need to modify the indexing routines).