Re: Big numbers (again) and complex routine
Re: Big numbers (again) and complex routine
- Subject: Re: Big numbers (again) and complex routine
- From: julifos <email@hidden>
- Date: Fri, 07 Mar 2003 20:00:17 +0100
<snip>
>
-------------------------------
>
read file "bla" for 2000000
>
-------------------------------
>
>
with a very short file, and I just get the whole contents of the file
OK. No problemo for short-length files.
<snip>
>
-------------------------------
>
read file "bla" from 2000001 for 2000000
>
-------------------------------
>
>
to get the next chunk of the file. You've got to read successive
>
chunks, since "read" does require an integer parameter, and you'll
>
never make 800,000,000 into an integer.
>
>
(FYI, OMM, reading and displaying 2 MB in a text window of Smile
>
takes 3.8 seconds)
Yep! My original routine works rigth for (eof is integer = true)
So, I think here is my problem. How to read a file from character
850.000.000 to 850.050.000?
Now, a strange behaviour. This works (apparently):
set k to (read alias "path:to:1,4GB file" from ("845874521" as number) to
("845895521" as number))
And, suddenly, this also works:
set k to (read alias "path:to:1,4GB file" from 8.45874521E+8 to
8.45895521E+8)
Or this should work allways? Somebody to test?
(here: OS 10.2.4, AS 1.9.1)
>
4. If you are manipulating numerical data, the "extractcolumn"
>
command of Smile may prove useful; though you'll get a more
>
professional feel if you can use binary files, and the "read binary"
>
command of the Satimage osax. Our clients use "read binary" against
>
gigabytes of data.
"read binary" is a powerful tool... Unfortunatelly, I must handle any file:
disk images, video, graphics, texts...
Then, if the above works, I must change my routine:
repeat with x from 1 to fEoF by 20000
...
A simple "repeat" incrementing "starting_at" variable and wait for an error
"end of file reached"...
JJ
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.