When I am reading a file byte by byte from the start of the file, and want
to read four bytes as a long or two bytes as a short, is the first byte I
read the high byte or the low byte in these cases?

I presume that because it's a file originating on Wintel - little endian -
I should treat the first byte as the least significant one - right?

That's right. Least significant byte should come first in this case.



Finally, let me know if I have got this right: - Cstrings have the length
of the string at the beginning of the file and have no special termination
char, Pascal strings have no length specifier, but terminate with a null
char.

It's actually the other way around. Cstrings are null byte terminated and Pstrings have the length in the beginning (I believe there a couple flavors, 1 and 2 byte lengths -hopefully somebody will chime in).


--
Cole
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to