Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: SKIPping in a file

From: joel:neely:fedex at: 9-Jul-2001 14:45

Hi, Gabriele, Gabriele Santilli wrote:
> SKIP has always been broken on /DIRECT ports AFAIK (at least, I > was never able to make it work). The workaround is using > COPY/PART. > > readtail: func [fn [file!] n [integer!]] [ > fn: open/binary/direct fn > copy/part fn fn/size - n > first reduce [copy/part fn n close fn] > ] > > (NOT TESTED) >
Well, it is now! (at least partially :) A quick check against my test files showed the expected result. Of course, it actually has to read through the part to be skipped, instead of just repositioning past it, which has a noticeable effect after a few megabytes...
> OPEN/SKIP also seems to give problems, on files at least... >
> I'd like to know, too... >
Thanks for the confirmation, and for the work-around! <sigh> I was really hoping you'd tell me that I hadn't read the the User Guide properly, and then send me a one-line correction to my broken script! ;-) </sigh> -jn- --------------------------------------------------------------- There are two types of science: physics and stamp collecting! -- Sir Arthur Eddington joel-dot-neely-at-fedex-dot-com