[REBOL] Working with binary data Re:
From: tim:johnsons-web at: 26-Sep-2000 18:00
Hi Jeff:
Try playing with the following code:
;===============================================================
variable: #{
524946462400000043444441666D742018000000010001005C774C0100000000
B253000000020000332D0400
}
print reform["first four bytes:" copy/part variable 4]
variable: skip variable 4
print reform["next four bytes:" copy/part variable 4]
print to-integer copy/part variable 4
;===============================================================
And of course, you can assign copy/part variable 4 to another word and
convert it into an integer:
>> second-integer: to-integer copy/part variable 4
== 603979776
I hope this helps...
Tim
[jr--brainbyte--com] wrote: