Thanks again David.
Jon
>Jon,
>
>I put together a set of functions a long time ago to deal with this issue. Take a look at them in this article from my website:
http://www.geocities.com/df_foxpro/qgen003.htm>
>>I need to replicate some functionality from a C application. The application writes out a long int (4bytes I beleive) into a binary file. The value can either be 1 or 0. The value within the file comes out as " ", I think I have managed to confuse myself somehow because I cant seem to get my head around this at the moment.