Thanks pekr:
        I was already looking at docs for
reverse when you're message came in.
Just curious, but are other OS's than
Windooz storing data in "non-reverse"
manner.
-Tim
At 11:35 PM 6/5/00 +0200, you wrote:
>
>
>[EMAIL PROTECTED] wrote:
>
>> I'd like to use rebol to read from binary data that
>> has been written by C programs.
>>
>> As a test:
>>
>> 1) C function writes 0x000002A1 // decimal 673
>> as a long integer to a four-byte file.
>>
>> 2)Data is stored in byte-reverse order as A1 02 00 00
>>
>> I then wrote the following rebol script:
>>
>> print test: read/binary/part %TestIO.txt 4
>> print test: to-integer test
>> ;results are
>> #{A1020000}
>> -1593704448
>>
>> So how do I read the file so the original value is
>> returned?
>
> to-integer head reverse #{A1020000}
>
>-pekr-
>
>>
>>
>> TIA
>> -Tim
>
>

Reply via email to