Hi Tim

Seems that skip does not work with open/direct/binary although it does work
with open/direct.  This may be a bug.

In the meantime, you can advance the file pointer with copy/part:

>> fp: open/direct/binary %test-char.r
>> copy/part fp 10      ; returned value discarded when run in a script
== #{6162636465666768696A}
>> print to-string buffer: copy/part fp 10
klmnopqrst
>> close fp
>>

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 16, 2000 8:56 AM
Subject: [REBOL] Reading Binary data Re:(2)


> Hi Jim:
> That part worked thanks! However, if have not gotten
> the results that I had hoped for.
> I had assumed that skip fp 10 would take me to offset
> 10. It appears that it has not.
>
> TestBin.txt contains the characters:
> "abcdefghijklmnopqrstuvwxyz"
>
> The following code :
> ;===============================================================
> fp: open/read/direct/binary %TestBin.txt
> skip fp 10
> print to-string buffer: copy/part fp 10
> close fp
> ;===============================================================
> produces:
>
> >> do %BinFile.r
> abcdefghij
>
> The result I would be looking for in buffer
> would be "klmnopqrst"
>
> So it appears that skip fp 10 is not advancing
> the "file pointer" to offset 10.
>
> what would I do to make that happen?
> Thanks
> Tim
-------snip-----------

Reply via email to