Re: Reading a binary file

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Wed, 16 Aug 2000 16:50:51 -0400, Brian Broker <bkb at CNW.COM> wrote:

>In the example for 'get_bytes', it shows how to read a binary file 100
>bytes at a time and when then length of the returned sequence is less than
>100, the end of the file has been reached:
>
>while 1 do
>    chunk = get_bytes(fn, 100) -- read 100 bytes at a time
>    whole_file &= chunk        -- chunk might be empty, that's ok
>    if length(chunk) < 100 then
>        exit
>    end if
>end while
>
>Is there an easier/faster way to read in a binary file to a sequence in one
>shot?
>

Brian:

   DOSWRAP.E by Jacques Deschenes has a disk BLOCKREAD function.

Bernie

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu