[REBOL] Re: big sizes?
From: tmoeller:fastmail:fm at: 19-Jun-2006 15:51
Hi Sunanda,
thanks for your explanation. I was thinking of the call scenario before,
but thought there was a better way. Normally info? or size? should do
the job. But i learned that to wait for it to do so could be a little
bit too time consuming. So i think using call is the best solution
available.
Cheers
Thorsten
On Sat, 17 Jun 2006 09:12:50 EDT, SunandaDH-aol.com said:
> Thorsten:
>
> > Has anyone a solution for this or can shed some light on me??
>
> Not a solution -- but a possible work around.
>
> problem 1: counting beyond 2**32
>
> Integer! doesn't work as you've noted.
>
> Decimal! values in REBOL are precise to around 10**14, so you can safely
> (as
> far as I can tell) do precise arithmetic up to around that bound:
> n: 0.0
> for p 0 14 1 [
> loop 9 [
> n: 10 ** p + n
> ]
> ]
> n
>
> Problem 2: getting the file sizes
>
> info? won't work as it returns the value in an integer. So you need to
> use an
> operating system call of some sort.
>
> Under Windows with a version of REBOL that has CALL enabled, it's simple:
>
> my-dir: copy ""
> call/output "dir \\p-hh-nas1\dbbackdev\mysql\newbackup\daily\tvfast" my-dir
>
> You can then parse out the file size column from the captured directory
> listing.
>
> Sunanda.
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
--
http://www.fastmail.fm - The way an email service should be