You tell 'em Galt!
Actually, I sure will. :)
I really think that rebol is cool, but
I'm not throwing away my C Compiler yet...
Thanks
-Tim
>Yes, this is totally lame.
>All the platforms on the planet offer
>random access to a harddrive.
>I noticed this the other day when
>I was trying to build a very large file
>and I couldn't just jump to the end
>and write some stuff.
>
>I didn't know that skip works on open/direct,
>since I only tried it with open/direct/binary.
>Lots of people wanting to do anything at all serious
>with files would use this kind of access.
>I haven't got the slightest idea why this bug
>hasn't been reported yet.
>
>Tim, I suggest you send a message to [EMAIL PROTECTED]
>Apparently they haven't been watching the list here.
>I would have reported it myself if I had known that
>open/direct actually does work with skip.
>
>The suggestion by Larry to use copy/part to skip the
>file ahead is not reasonable for any kind of large file.
>Plus, Rebol had better be able to skip backwards
>on a binary file or else it is brain-dead for file
>handling. It's not like were asking for built-in
>nuclear cooling tower handling or something.
>This is bread and butter. Binary is more basic
>than line-oriented handling, unix experiences to
>the contrary not withstanding :(-
>
>-Galt
>
>>===== Original Message From [EMAIL PROTECTED] =====
>>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-----------
>
>