[REBOL] Re: big sizes?
From: SunandaDH:aol at: 17-Jun-2006 9:12
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" my-dir
You can then parse out the file size column from the captured directory
listing.
Sunanda.